Commit a519d70e authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Mauro Carvalho Chehab

[media] media: video: pvrusb2: fix memory leak

Use put_device() instead of kfree() because of device name leak.
Signed-off-by: default avatarVasiliy Kulikov <segoon@openwall.com>
Acked-by: default avatarMike Isely <isely@pobox.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9028f58f
...@@ -647,7 +647,7 @@ static void class_dev_create(struct pvr2_sysfs *sfp, ...@@ -647,7 +647,7 @@ static void class_dev_create(struct pvr2_sysfs *sfp,
if (ret) { if (ret) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"device_register failed"); "device_register failed");
kfree(class_dev); put_device(class_dev);
return; return;
} }
......
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