parport: oops

Tim Waugh (tim@cyberelk.demon.co.uk)
Mon, 20 Jul 1998 21:14:57 +0100 (BST)


Hi,

This fixes an uninitialised-variable bug that will lead to an oops.

Tim.
*/

--- linux/drivers/misc/parport_share.c~ Mon Jul 20 20:37:19 1998
+++ linux/drivers/misc/parport_share.c Mon Jul 20 21:07:58 1998
@@ -156,16 +156,16 @@
"%s not found in port list!\n", port->name);
}
spin_unlock_irqrestore (&parportlist_lock, flags);
- if (p->probe_info.class_name)
- kfree (p->probe_info.class_name);
- if (p->probe_info.mfr)
- kfree (p->probe_info.mfr);
- if (p->probe_info.model)
- kfree (p->probe_info.model);
- if (p->probe_info.cmdset)
- kfree (p->probe_info.cmdset);
- if (p->probe_info.description)
- kfree (p->probe_info.description);
+ if (port->probe_info.class_name)
+ kfree (port->probe_info.class_name);
+ if (port->probe_info.mfr)
+ kfree (port->probe_info.mfr);
+ if (port->probe_info.model)
+ kfree (port->probe_info.model);
+ if (port->probe_info.cmdset)
+ kfree (port->probe_info.cmdset);
+ if (port->probe_info.description)
+ kfree (port->probe_info.description);
kfree(port->name);
kfree(port);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html