projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e4304d
)
WMI: do not leak memory in parse_wdg()
author
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Thu, 26 Aug 2010 07:14:58 +0000
(
00:14
-0700)
committer
Matthew Garrett
<mjg@redhat.com>
Thu, 21 Oct 2010 13:36:47 +0000
(09:36 -0400)
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>
drivers/platform/x86/wmi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/platform/x86/wmi.c
b/drivers/platform/x86/wmi.c
index 88ce87c74e2713d2a51317a808ef6df6b96a0b71..a24a4b52c919135589bcfa89de0fb7b334041a6e 100644
(file)
--- a/
drivers/platform/x86/wmi.c
+++ b/
drivers/platform/x86/wmi.c
@@
-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);