Staging: ft1000-usb: freeing uninitialized pointer
authorDan Carpenter <error27@gmail.com>
Wed, 17 Nov 2010 08:54:35 +0000 (11:54 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 17 Nov 2010 21:14:13 +0000 (13:14 -0800)
GCC complains that if (info->CardReady) is false we kfree() an
uninitialized pointer.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c

index 7b49633..76cee9e 100644 (file)
@@ -650,7 +650,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
         break;
     case IOCTL_SET_DPRAM_CMD:
         {
-            IOCTL_DPRAM_BLK *dpram_data;
+            IOCTL_DPRAM_BLK *dpram_data = NULL;
             //IOCTL_DPRAM_COMMAND dpram_command;
             u16 qtype;
             u16 msgsz;