mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-21 23:45:03 +08:00
Merge pull request #279 from NOVBobLee/fix_memleak
Fix potential memory leak in vinput
This commit is contained in:
commit
e3e2ee35af
|
@ -283,10 +283,12 @@ static ssize_t export_store(struct class *class, struct class_attribute *attr,
|
|||
return len;
|
||||
|
||||
fail_register_vinput:
|
||||
input_free_device(vinput->input);
|
||||
device_unregister(&vinput->dev);
|
||||
/* avoid calling vinput_destroy_vdevice() twice */
|
||||
return err;
|
||||
fail_register:
|
||||
input_free_device(vinput->input);
|
||||
vinput_destroy_vdevice(vinput);
|
||||
fail:
|
||||
return err;
|
||||
|
|
Loading…
Reference in New Issue
Block a user