]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
platform/x86: dell-smbios-wmi: Correct a memory leak
authorMario Limonciello <mario.limonciello@dell.com>
Mon, 10 Sep 2018 18:01:52 +0000 (13:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Sep 2018 09:55:56 +0000 (02:55 -0700)
commit affab51082174f60ef71ced8ab5fbe71f00e9ae3 upstream.

ACPI buffers were being allocated but never freed.

Reported-by: Pinzhen Xu <pinzhen.xu@intel.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Cc: stable@vger.kernel.org
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/dell-smbios-wmi.c

index fbefedb1c17237c5a926446bb9162ef2a8fcb993..548abba2c1e9bd1ce882819afd9105d0f0235292 100644 (file)
@@ -78,6 +78,7 @@ static int run_smbios_call(struct wmi_device *wdev)
        dev_dbg(&wdev->dev, "result: [%08x,%08x,%08x,%08x]\n",
                priv->buf->std.output[0], priv->buf->std.output[1],
                priv->buf->std.output[2], priv->buf->std.output[3]);
+       kfree(output.pointer);
 
        return 0;
 }