diff options
author | Dan Carpenter <error27@gmail.com> | 2011-03-10 11:31:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-11 14:26:08 -0800 |
commit | 8b0fb6f872477dfd218e43b073543e4913b6d785 (patch) | |
tree | 2d26bb8b6bb6b9d71bc877cf03247fbfa834f854 /drivers/usb/storage | |
parent | e0cc8a60c4f9352c8281af6eb49f13cf5a7bb476 (diff) |
USB: ene_ub6250: fix memory leak in ene_load_bincode()
"buf" gets allocated twice in a row. It's the second allocation which
is correct. The first one should be removed.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: huajun li <huajun.li.lee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/ene_ub6250.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c index 058c5d5f1c1..08e03745e25 100644 --- a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c @@ -491,10 +491,6 @@ static int ene_load_bincode(struct us_data *us, unsigned char flag) if (info->BIN_FLAG == flag) return USB_STOR_TRANSPORT_GOOD; - buf = kmalloc(ENE_BIN_CODE_LEN, GFP_KERNEL); - if (buf == NULL) - return USB_STOR_TRANSPORT_ERROR; - switch (flag) { /* For SD */ case SD_INIT1_PATTERN: |