Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0624a90 authored by Yong Wang's avatar Yong Wang Committed by Matthew Garrett
Browse files

dell-wmi: Fix memory leak



The output of wmi_get_event_data shall be freed before return.

Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
Signed-off-by: default avatarYong Wang <yong.y.wang@linux.intel.com>
parent 3d7b1655
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -217,6 +217,7 @@ static void dell_wmi_notify(u32 value, void *context)
		if (dell_new_hk_type && (buffer_entry[1] != 0x10)) {
			printk(KERN_INFO "dell-wmi: Received unknown WMI event"
					 " (0x%x)\n", buffer_entry[1]);
			kfree(obj);
			return;
		}

@@ -234,7 +235,7 @@ static void dell_wmi_notify(u32 value, void *context)
			    key->keycode == KEY_BRIGHTNESSDOWN) && acpi_video) {
			/* Don't report brightness notifications that will also
			 * come via ACPI */
			return;
			;
		} else {
			input_report_key(dell_wmi_input_dev, key->keycode, 1);
			input_sync(dell_wmi_input_dev);