Commit 2c1a3c97 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (10229): ivtv: fix memory leak

Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2fd9c2ea
...@@ -949,8 +949,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev, ...@@ -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),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment