summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasiliy Kulikov <segoon@openwall.com>2010-11-19 15:41:49 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 08:17:18 -0200
commita519d70e0cf346e946202ffcbeaf57a1748d0c03 (patch)
treee298b6ed57c82835540622f04ec47af7e42d7c04
parent9028f58f5d7e810a0e88b508ebe6a69daf7e3273 (diff)
[media] media: video: pvrusb2: fix memory leak
Use put_device() instead of kfree() because of device name leak. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
index 3d7e5aab547..281806b2df6 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
@@ -647,7 +647,7 @@ static void class_dev_create(struct pvr2_sysfs *sfp,
if (ret) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"device_register failed");
- kfree(class_dev);
+ put_device(class_dev);
return;
}