Browse Source

Merge pull request #278 from NOVBobLee/fix_refcnt

Fix potential reference count leak in vinput
Jim Huang 6 tháng trước cách đây
mục cha
commit
67713859df
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      examples/vinput.c

+ 2 - 0
examples/vinput.c

@@ -284,6 +284,8 @@ static ssize_t export_store(struct class *class, struct class_attribute *attr,
 
 fail_register_vinput:
     device_unregister(&vinput->dev);
+    /* avoid calling vinput_destroy_vdevice() twice */
+    return err;
 fail_register:
     vinput_destroy_vdevice(vinput);
 fail: