diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2009-07-19 12:09:32 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2009-07-19 12:09:32 +0200 |
commit | 13f81b30dcdaede4d7b3fc982a6d63c494aff666 (patch) | |
tree | d71e979673055e4f3ec7256444a487c260eb365d /linux/drivers/media/video/gspca/sonixj.c | |
parent | 624d36913e55b452914dcaa83e0ff84330bf3ec0 (diff) | |
download | mediapointer-dvb-s2-13f81b30dcdaede4d7b3fc982a6d63c494aff666.tar.gz mediapointer-dvb-s2-13f81b30dcdaede4d7b3fc982a6d63c494aff666.tar.bz2 |
gspca - jpeg subdrivers: Check the result of kmalloc(jpeg header).
From: Julia Lawall <julia@diku.dk>
Priority: high
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/sonixj.c')
-rw-r--r-- | linux/drivers/media/video/gspca/sonixj.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/drivers/media/video/gspca/sonixj.c b/linux/drivers/media/video/gspca/sonixj.c index 3d2722704..5568401e8 100644 --- a/linux/drivers/media/video/gspca/sonixj.c +++ b/linux/drivers/media/video/gspca/sonixj.c @@ -1780,6 +1780,8 @@ static int sd_start(struct gspca_dev *gspca_dev) /* create the JPEG header */ sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); + if (!sd->jpeg_hdr) + return -ENOMEM; jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, 0x21); /* JPEG 422 */ jpeg_set_qual(sd->jpeg_hdr, sd->quality); |