diff --git a/examples/vinput.c b/examples/vinput.c index ebb97e2..0b33b18 100644 --- a/examples/vinput.c +++ b/examples/vinput.c @@ -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;