[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:
Родитель
9028f58f5d
Коммит
a519d70e0c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче