mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 09:33:31 +02:00
platform/x86: dell-smbios-wmi: Add missing kfree in error-exit from run_smbios_call
As pointed out be Kees Cook if we return -EIO because the
obj->type != ACPI_TYPE_BUFFER, then we must kfree the
output buffer before the return.
Fixes: 1a258e6704 ("platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver")
Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210826140822.71198-1-hdegoede@redhat.com
This commit is contained in:
parent
fb49d9946f
commit
0487d4fc42
|
|
@ -69,6 +69,7 @@ static int run_smbios_call(struct wmi_device *wdev)
|
|||
if (obj->type == ACPI_TYPE_INTEGER)
|
||||
dev_dbg(&wdev->dev, "SMBIOS call failed: %llu\n",
|
||||
obj->integer.value);
|
||||
kfree(output.pointer);
|
||||
return -EIO;
|
||||
}
|
||||
memcpy(input.pointer, obj->buffer.pointer, obj->buffer.length);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user