Commit 6e9490a7 authored by Oliver Neukum's avatar Oliver Neukum Committed by Paul Mackerras

usb vicam driver:

	- fix for memory leak.
parent 32e33aaf
......@@ -896,13 +896,18 @@ static void * __devinit vicam_probe(struct usb_device *udev, unsigned int ifnum,
vicam->win.contrast = 10;
/* FIXME */
if (vicam_init(vicam))
if (vicam_init(vicam)) {
usb_free_urb(vicam->readurb);
kfree(vicam);
return NULL;
}
memcpy(&vicam->vdev, &vicam_template, sizeof(vicam_template));
memcpy(vicam->vdev.name, vicam->camera_name, strlen(vicam->camera_name));
if (video_register_device(&vicam->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
err("video_register_device");
usb_free_urb(vicam->readurb);
kfree(vicam);
return NULL;
}
......
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