Skip to content

Commit 6771385

Browse files
authored
Merge pull request #278 from NOVBobLee/fix_refcnt
Fix potential reference count leak in vinput
2 parents ac18946 + 3ec01e2 commit 6771385

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/vinput.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ static ssize_t export_store(struct class *class, struct class_attribute *attr,
284284

285285
fail_register_vinput:
286286
device_unregister(&vinput->dev);
287+
/* avoid calling vinput_destroy_vdevice() twice */
288+
return err;
287289
fail_register:
288290
vinput_destroy_vdevice(vinput);
289291
fail:

0 commit comments

Comments
 (0)