Commit ba2ef3b3 authored by Boaz Harrosh's avatar Boaz Harrosh Committed by Greg Kroah-Hartman

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: default avatarBoaz Harrosh <bharrosh@panasas.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b483b6aa
...@@ -1230,6 +1230,7 @@ static int isd200_get_inquiry_data( struct us_data *us ) ...@@ -1230,6 +1230,7 @@ static int isd200_get_inquiry_data( struct us_data *us )
/* Free driver structure */ /* Free driver structure */
us->extra_destructor(info); us->extra_destructor(info);
kfree(info);
us->extra = NULL; us->extra = NULL;
us->extra_destructor = NULL; us->extra_destructor = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment