mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
V4L/DVB (5489): Codec.c: check kmalloc() return value.
Signed-off-by: Amit Choudhary <amit2030@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
aaa40cb8b7
commit
20ec811edd
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
"<S>lave or attached <M>aster name type flags magic ");
|
||||
|
|
Loading…
Reference in a new issue