Skip to contentSkip to conversation

USB: add free_len=0 initialization to ipaq.c

PATCH Pete Zaitcev 1 participant 1 message Jul 27, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

This is what happens when driver writers neglect memset after kmalloc. Patch by Ganesh Varadaraja.

drivers/usb/serial/ipaq.c +1 -0
diff -urp -X dontdiff linux-2.4.27-rc3/drivers/usb/serial/ipaq.c linux-2.4.27-rc3-usbx/drivers/usb/serial/ipaq.c
@@ -188,6 +188,7 @@ static int ipaq_open(struct usb_serial_p
 	port->private = (void *)priv;
 	priv->active = 0;
 	priv->queue_len = 0;
+	priv->free_len = 0;
 	INIT_LIST_HEAD(&priv->queue);
 	INIT_LIST_HEAD(&priv->freelist);