public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] Staging: ft1000-usb: freeing uninitialized pointer
@ 2010-11-17  8:54 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-11-17  8:54 UTC (permalink / raw)
  To: kernel-janitors

GCC complains that if (info->CardReady) is false we kfree() an
uninitialized pointer.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
index 7b496332..76cee9e 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
@@ -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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-11-17  8:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-17  8:54 [patch] Staging: ft1000-usb: freeing uninitialized pointer Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox