From: Boaz Harrosh Date: Mon, 17 Mar 2008 21:21:01 +0000 (-0700) Subject: USB: isd200: fix memory leak in isd200_get_inquiry_data X-Git-Tag: v2.6.25-rc7~5^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba2ef3b36c8ad9aa1df6b2061b0a56f68c64776d;p=linux-2.6 USB: isd200: fix memory leak in isd200_get_inquiry_data If the inquiry fails then the info structure on us->extra was not freed. Signed-off-by: Boaz Harrosh Acked-by: Alan Stern Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index 9d3f28b92c..971d13dd5e 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c @@ -1230,6 +1230,7 @@ static int isd200_get_inquiry_data( struct us_data *us ) /* Free driver structure */ us->extra_destructor(info); + kfree(info); us->extra = NULL; us->extra_destructor = NULL; }