* [PATCH] [REVISED] drivers/media/video/videocodec.c: check kmalloc() return value.
@ 2007-03-11 23:22 Amit Choudhary
0 siblings, 0 replies; only message in thread
From: Amit Choudhary @ 2007-03-11 23:22 UTC (permalink / raw)
To: Linux Kernel; +Cc: video4linux-list
Description: Check the return value of kmalloc() in function videocodec_build_table(), in file drivers/media/video/videocodec.c.
Signed-off-by: Amit Choudhary <amit2030@gmail.com>
diff --git a/drivers/media/video/videocodec.c b/drivers/media/video/videocodec.c
index 290e641..f2bbd7a 100644
--- a/drivers/media/video/videocodec.c
+++ b/drivers/media/video/videocodec.c
@@ -348,6 +348,9 @@ #define LINESIZE 100
kfree(videocodec_buf);
videocodec_buf = kmalloc(size, GFP_KERNEL);
+ if (!videocodec_buf)
+ return 0;
+
i = 0;
i += scnprintf(videocodec_buf + i, size - 1,
"<S>lave or attached <M>aster name type flags magic ");
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-11 23:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-11 23:22 [PATCH] [REVISED] drivers/media/video/videocodec.c: check kmalloc() return value Amit Choudhary
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.