aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-08-26 03:14:58 -0400
committerMatthew Garrett <mjg@redhat.com>2010-10-21 09:36:47 -0400
commit64ed0ab8d060d28a7787de29c76178c2efc1dd65 (patch)
tree0fb02e7d696f310886a9e57c01130322fc60e3e8 /drivers/platform
parent4e4304d7498c85f6ea798ee5fcb5d3bd3741e74f (diff)
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/wmi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 88ce87c74e27..a24a4b52c919 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -825,8 +825,10 @@ static acpi_status parse_wdg(acpi_handle handle)
825 825
826 obj = (union acpi_object *) out.pointer; 826 obj = (union acpi_object *) out.pointer;
827 827
828 if (obj->type != ACPI_TYPE_BUFFER) 828 if (obj->type != ACPI_TYPE_BUFFER) {
829 return AE_ERROR; 829 status = AE_ERROR;
830 goto out_free_pointer;
831 }
830 832
831 total = obj->buffer.length / sizeof(struct guid_block); 833 total = obj->buffer.length / sizeof(struct guid_block);
832 834