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

Commit 64ed0ab8 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Matthew Garrett
Browse files

WMI: do not leak memory in parse_wdg()



If we _WDG returned object that is not buffer we were forgetting
to free memory allocated for that object.

Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 4e4304d7
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -825,8 +825,10 @@ static acpi_status parse_wdg(acpi_handle handle)

	obj = (union acpi_object *) out.pointer;

	if (obj->type != ACPI_TYPE_BUFFER)
		return AE_ERROR;
	if (obj->type != ACPI_TYPE_BUFFER) {
		status = AE_ERROR;
		goto out_free_pointer;
	}

	total = obj->buffer.length / sizeof(struct guid_block);