Message ID | 1309788705-22278-2-git-send-email-julia@diku.dk (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c index c119350..0aad9cc 100644 --- a/drivers/media/video/bw-qcam.c +++ b/drivers/media/video/bw-qcam.c @@ -895,6 +895,7 @@ static struct qcam *qcam_init(struct parport *port) if (v4l2_device_register(NULL, v4l2_dev) < 0) { v4l2_err(v4l2_dev, "Could not register v4l2_device\n"); + kfree(qcam); return NULL; } diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c index 24fc009..351b2db 100644 --- a/drivers/media/video/c-qcam.c +++ b/drivers/media/video/c-qcam.c @@ -752,6 +752,7 @@ static struct qcam *qcam_init(struct parport *port) if (v4l2_device_register(NULL, v4l2_dev) < 0) { v4l2_err(v4l2_dev, "Could not register v4l2_device\n"); + kfree(qcam); return NULL; }