V4L/DVB (10229): ivtv: fix memory leak
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
2fd9c2eac3
commit
2c1a3c979c
@@ -949,8 +949,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
|
|||||||
itv->instance = atomic_inc_return(&ivtv_instance) - 1;
|
itv->instance = atomic_inc_return(&ivtv_instance) - 1;
|
||||||
|
|
||||||
retval = v4l2_device_register(&dev->dev, &itv->device);
|
retval = v4l2_device_register(&dev->dev, &itv->device);
|
||||||
if (retval)
|
if (retval) {
|
||||||
|
kfree(itv);
|
||||||
return retval;
|
return retval;
|
||||||
|
}
|
||||||
/* "ivtv + PCI ID" is a bit of a mouthful, so use
|
/* "ivtv + PCI ID" is a bit of a mouthful, so use
|
||||||
"ivtv + instance" instead. */
|
"ivtv + instance" instead. */
|
||||||
snprintf(itv->device.name, sizeof(itv->device.name),
|
snprintf(itv->device.name, sizeof(itv->device.name),
|
||||||
|
Reference in New Issue
Block a user