[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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
9028f58f5d
commit
a519d70e0c
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user