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: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 88ce87c..a24a4b5 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -825,8 +825,10 @@
 
 	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);