mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-22 04:31:09 +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;
|
return len;
|
||||||
|
|
||||||
fail_register_vinput:
|
fail_register_vinput:
|
||||||
|
input_free_device(vinput->input);
|
||||||
device_unregister(&vinput->dev);
|
device_unregister(&vinput->dev);
|
||||||
/* avoid calling vinput_destroy_vdevice() twice */
|
/* avoid calling vinput_destroy_vdevice() twice */
|
||||||
return err;
|
return err;
|
||||||
fail_register:
|
fail_register:
|
||||||
|
input_free_device(vinput->input);
|
||||||
vinput_destroy_vdevice(vinput);
|
vinput_destroy_vdevice(vinput);
|
||||||
fail:
|
fail:
|
||||||
return err;
|
return err;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user