Skip to content

Commit

Permalink
can: esd_usb2: fix memory leak on disconnect
Browse files Browse the repository at this point in the history
It seems struct esd_usb2 dev is not deallocated on disconnect. The patch adds
the missing deallocation.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Alexey Khoroshilov authored and Marc Kleine-Budde committed Nov 18, 2014
1 parent 98e6901 commit efbd50d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/can/usb/esd_usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,7 @@ static void esd_usb2_disconnect(struct usb_interface *intf)
}
}
unlink_all_urbs(dev);
kfree(dev);
}
}

Expand Down

0 comments on commit efbd50d

Please sign in to comment.