[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1401488411-22458-1-git-send-email-khoroshilov@ispras.ru>
Date: Sat, 31 May 2014 02:20:11 +0400
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
To: Huang Shijie <shijie8@...il.com>,
Hans Verkuil <hverkuil@...all.nl>,
Carvalho Chehab <m.chehab@...sung.com>
Cc: Alexey Khoroshilov <khoroshilov@...ras.ru>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
ldv-project@...uxtesting.org
Subject: [PATCH] [media] tlg2300: fix leak at failure path in poseidon_probe()
Error handling code in poseidon_probe() misses usb_put_intf()
and usb_put_dev().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
---
drivers/media/usb/tlg2300/pd-main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/usb/tlg2300/pd-main.c b/drivers/media/usb/tlg2300/pd-main.c
index 3316caa4733b..b31f4791b8ff 100644
--- a/drivers/media/usb/tlg2300/pd-main.c
+++ b/drivers/media/usb/tlg2300/pd-main.c
@@ -476,6 +476,8 @@ err_audio:
err_video:
v4l2_device_unregister(&pd->v4l2_dev);
err_v4l2:
+ usb_put_intf(pd->interface);
+ usb_put_dev(pd->udev);
kfree(pd);
return ret;
}
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists