diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-01-12 22:10:43 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-01-12 22:10:43 +0100 |
commit | 1272155262bde83414dbfdd8bf7bb931a04c1385 (patch) | |
tree | edfbb06f532ef097dbb2d6923523225ad039566b | |
parent | 60514cdd01298455a98066edd16a562ee2750ce7 (diff) | |
download | mediapointer-dvb-s2-1272155262bde83414dbfdd8bf7bb931a04c1385.tar.gz mediapointer-dvb-s2-1272155262bde83414dbfdd8bf7bb931a04c1385.tar.bz2 |
ivtv: fix memory leak
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: high
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-driver.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c index b712c29e7..05bba3928 100644 --- a/linux/drivers/media/video/ivtv/ivtv-driver.c +++ b/linux/drivers/media/video/ivtv/ivtv-driver.c @@ -953,8 +953,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev, itv->instance = atomic_inc_return(&ivtv_instance) - 1; retval = v4l2_device_register(&dev->dev, &itv->device); - if (retval) + if (retval) { + kfree(itv); return retval; + } /* "ivtv + PCI ID" is a bit of a mouthful, so use "ivtv + instance" instead. */ snprintf(itv->device.name, sizeof(itv->device.name), |