Fix memory leak in sierra_release()
Subsystems (2)
I found a memory leak in sierra_release() (well sierra_probe() I guess) that looses 8 bytes each time the driver releases a device.
Here is the patch to fix it.
drivers/usb/serial/sierra.c +1 -0
@@ -959,6 +959,7 @@ static void sierra_release(struct usb_serial *serial)continue ;kfree (portdata); } +kfree (serial->private); }#ifdef CONFIG_PM
Signature · 1 line
Len Sorensen
Quoted 10 lines · Lennart Sorensen
I found a memory leak in
sierra_release()(wellsierra_probe()I guess) that looses 8 bytes each time the driver releases a device.Here is the patch to fix it.
drivers/usb/serial/sierra.c +0
-0
drivers/usb/serial/sierra.c static void sierra_release(struct usb_serial *serial) · line 965
Quoted 7 lines
drivers/usb/serial/sierra.c +1
-0@@ -959,6 +959,7 @@ static void sierra_release(struct usb_serial *serial)continue ;kfree (portdata); } +kfree (serial->private); }#ifdef CONFIG_PM
Looks sensible to me, but needs a signed-off-by and CC to linux-usb.
Bjørn
Quoted 18 lines · Bjørn Mork
Quoted 16 lines · Lennart Sorensen
I found a memory leak in
sierra_release()(wellsierra_probe()I guess) that looses 8 bytes each time the driver releases a device.Here is the patch to fix it.
drivers/usb/serial/sierra.c +1
-0@@ -959,6 +959,7 @@ static void sierra_release(struct usb_serial *serial)continue ;kfree (portdata); } +kfree (serial->private); }
Quoted 3 lines
drivers/usb/serial/sierra.c static void sierra_release(struct usb_serial *serial) · line 965
Quoted 1 line
drivers/usb/serial/sierra.c +0
-0#ifdef CONFIG_PM Looks sensible to me, but needs a signed-off-by and CC to linux-usb.
Oh yeah. I shouldn't send patches at the end of the day.
I will try again.
Signature · 1 line
Len Sorensen