From e45c87c4fd0b12b36a999c7ff621cd46f93b041d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 30 Mar 2007 17:34:14 -0300 Subject: Codec.c: check kmalloc() return value. From: Amit Choudhary Signed-off-by: Amit Choudhary Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/videocodec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux/drivers/media/video/videocodec.c b/linux/drivers/media/video/videocodec.c index 290e64135..f2bbd7a4d 100644 --- a/linux/drivers/media/video/videocodec.c +++ b/linux/drivers/media/video/videocodec.c @@ -348,6 +348,9 @@ videocodec_build_table (void) kfree(videocodec_buf); videocodec_buf = kmalloc(size, GFP_KERNEL); + if (!videocodec_buf) + return 0; + i = 0; i += scnprintf(videocodec_buf + i, size - 1, "lave or attached aster name type flags magic "); -- cgit v1.2.3