Skip to content

Commit

Permalink
[media] media: video: pvrusb2: fix memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasiliy Kulikov authored and Mauro Carvalho Chehab committed Dec 29, 2010
1 parent 9028f58 commit a519d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/pvrusb2/pvrusb2-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a519d70

Please sign in to comment.