summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-08-15 10:40:12 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-08-15 10:40:12 -0300
commitd66d5cf09e9f237abbfe1e9da00a3ac48daec5bf (patch)
tree1b98891c1851d405500c85132a3e177c4d127c17 /linux/drivers/media/dvb/dvb-usb
parent8c3cb543d95724a911f77d4c377ad1066557e611 (diff)
downloadmediapointer-dvb-s2-d66d5cf09e9f237abbfe1e9da00a3ac48daec5bf.tar.gz
mediapointer-dvb-s2-d66d5cf09e9f237abbfe1e9da00a3ac48daec5bf.tar.bz2
Fix a memory leak in em28xx_usb_probe()
From: Jesper Juhl <jesper.juhl@gmail.com> If, in em28xx_usb_probe() the memory allocation dev->alt_max_pkt_size = kmalloc(32* dev->num_alt,GFP_KERNEL); fails, then we'll bail out and return -ENOMEM. The problem is that in that case we don't free the storage allocated to 'dev', thus causing a memory leak. This patch fixes the leak by freeing 'dev' before we return -ENOMEM. This fixes Coverity bug #647. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb')
0 files changed, 0 insertions, 0 deletions