summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorMark Langsdorf <mlangsdo@redhat.com>2021-04-23 10:28:17 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-22 10:38:16 +0200
commit1d53ca5d131074c925ce38361fb0376d3bf7e394 (patch)
treed977abfa2a2f5dc9b65104774f137b584dabfd41 /tools/perf/scripts/python/export-to-postgresql.py
parentadf1f8d208d0a4d1155add53adf5dde36495add9 (diff)
ACPI: custom_method: fix potential use-after-free issue
commit e483bb9a991bdae29a0caa4b3a6d002c968f94aa upstream. In cm_write(), buf is always freed when reaching the end of the function. If the requested count is less than table.length, the allocated buffer will be freed but subsequent calls to cm_write() will still try to access it. Remove the unconditional kfree(buf) at the end of the function and set the buf to NULL in the -EINVAL error path to match the rest of function. Fixes: 03d1571d9513 ("ACPI: custom_method: fix memory leaks") 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions