summaryrefslogtreecommitdiffstats
path: root/lib/sbitmap.c
diff options
context:
space:
mode:
authorMark Langsdorf <mlangsdo@redhat.com>2021-04-27 13:54:33 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-04-28 19:17:54 +0200
commit1cfd8956437f842836e8a066b40d1ec2fc01f13e (patch)
treee843fc6d6d26bd778bbe7529ffc0c3e115628f39 /lib/sbitmap.c
parente483bb9a991bdae29a0caa4b3a6d002c968f94aa (diff)
downloadlinux-stable-1cfd8956437f842836e8a066b40d1ec2fc01f13e.tar.gz
linux-stable-1cfd8956437f842836e8a066b40d1ec2fc01f13e.tar.bz2
linux-stable-1cfd8956437f842836e8a066b40d1ec2fc01f13e.zip
ACPI: custom_method: fix a possible memory leak
In cm_write(), if the 'buf' is allocated memory but not fully consumed, it is possible to reallocate the buffer without freeing it by passing '*ppos' as 0 on a subsequent call. Add an explicit kfree() before kzalloc() to prevent the possible memory leak. Fixes: 526b4af47f44 ("ACPI: Split out custom_method functionality into an own driver") Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com> Cc: 5.4+ <stable@vger.kernel.org> # 5.4+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'lib/sbitmap.c')
0 files changed, 0 insertions, 0 deletions