public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] drivers/ieee1394/raw1394.c: fix a NULL pointer dereference
@ 2005-11-20 23:20 Adrian Bunk
  2005-11-20 23:33 ` Jody McIntyre
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Adrian Bunk @ 2005-11-20 23:20 UTC (permalink / raw)
  To: bcollins, dan; +Cc: linux1394-devel, scjody, linux-kernel, stable

The coverity checker spotted that this was a NULL pointer dereference in 
the "if (copy_from_user(...))" case.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.15-rc1-mm2-full/drivers/ieee1394/raw1394.c.old	2005-11-20 22:08:57.000000000 +0100
+++ linux-2.6.15-rc1-mm2-full/drivers/ieee1394/raw1394.c	2005-11-20 22:09:34.000000000 +0100
@@ -2166,7 +2166,8 @@
 			}
 		}
 	}
-	kfree(cache->filled_head);
+	if(cache->filled_head)
+		kfree(cache->filled_head);
 	kfree(cache);
 
 	if (ret >= 0) {


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-11-21 22:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-20 23:20 [2.6 patch] drivers/ieee1394/raw1394.c: fix a NULL pointer dereference Adrian Bunk
2005-11-20 23:33 ` Jody McIntyre
2005-11-20 23:46   ` Adrian Bunk
2005-11-20 23:54     ` Adrian Bunk
2005-11-20 23:40 ` Dave Jones
2005-11-20 23:52   ` Adrian Bunk
2005-11-21 19:13     ` Stefan Richter
2005-11-21 18:56       ` Ben Collins
2005-11-21 21:52         ` Jody McIntyre
2005-11-21 22:09           ` Stefan Richter
2005-11-21 22:32             ` Jody McIntyre
2005-11-21 21:55     ` Jody McIntyre
2005-11-20 23:45 ` Jesper Juhl
2005-11-20 23:54   ` Adrian Bunk

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