From: Amit Choudhary Date: Fri, 30 Mar 2007 20:34:14 +0000 (-0300) Subject: V4L/DVB (5489): Codec.c: check kmalloc() return value. X-Git-Tag: firefly_0821_release~30268^2~54 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=20ec811eddb362f821c6fd57e5449f3ddb80b466;p=firefly-linux-kernel-4.4.55.git V4L/DVB (5489): Codec.c: check kmalloc() return value. Signed-off-by: Amit Choudhary Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/videocodec.c b/drivers/media/video/videocodec.c index 290e64135650..f2bbd7a4d562 100644 --- a/drivers/media/video/videocodec.c +++ b/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 ");