瀏覽代碼

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 <bharrosh@panasas.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Boaz Harrosh 17 年之前
父節點
當前提交
ba2ef3b36c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/usb/storage/isd200.c

+ 1 - 0
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;
 		}