提交 64ed0ab8 编写于 作者: D Dmitry Torokhov 提交者: Matthew Garrett

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: NDmitry Torokhov <dtor@mail.ru>
Signed-off-by: NMatthew Garrett <mjg@redhat.com>
上级 4e4304d7
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册