android_kernel_oneplus_msm8998/tools
Yunfeng Ye 5952dc84e2 perf kmem: Fix memory leak in compact_gfp_flags()
[ Upstream commit 1abecfcaa7bba21c9985e0136fa49836164dd8fd ]

The memory @orig_flags is allocated by strdup(), it is freed on the
normal path, but leak to free on the error path.

Fix this by adding free(orig_flags) on the error path.

Fixes: 0e11115644 ("perf kmem: Print gfp flags in human readable string")
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Feilong Lin <linfeilong@huawei.com>
Cc: Hu Shiyuan <hushiyuan@huawei.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/f9e9f458-96f3-4a97-a1d5-9feec2420e07@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-10 11:21:08 +01:00
..
arch perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks 2019-03-23 08:44:37 +01:00
build Kbuild: fix # escaping in .cmd files for future Make 2018-07-19 15:35:57 +02:00
cgroup
firewire
hv Tools: hv: kvp: eliminate 'may be used uninitialized' warning 2019-09-10 10:29:48 +01:00
iio iio: iio-utils: Fix possible incorrect mask calculation 2019-08-04 09:34:57 +02:00
include tools include: Adopt linux/bits.h 2019-06-11 12:23:53 +02:00
laptop/freefall Move freefall program from Documentation/ to tools/ 2015-06-08 16:42:07 -06:00
lguest tools/lguest: Clean up include dir 2015-08-26 06:12:35 +02:00
lib tools lib traceevent: Do not free tep->cmdlines in add_new_comm() on failure 2019-10-17 13:40:56 -07:00
net tools/net: Use include/uapi with __EXPORTED_HEADERS__ 2015-11-15 17:24:33 -05:00
nfsd
perf perf kmem: Fix memory leak in compact_gfp_flags() 2019-11-10 11:21:08 +01:00
power tools/power turbostat: fix buffer overrun 2019-09-21 07:12:52 +02:00
scripts Kbuild: fix # escaping in .cmd files for future Make 2018-07-19 15:35:57 +02:00
testing selftests: kvm: Adding config fragments 2019-09-06 10:18:09 +02:00
thermal/tmon tools/thermal: tmon: fix for segfault 2018-05-30 07:49:10 +02:00
time tools: add script to test udelay 2014-07-23 10:16:38 -07:00
usb tools: usb: ffs-test: Fix build on big endian systems 2018-09-05 09:18:34 +02:00
virtio tools/virtio: fix byteswap logic 2015-12-07 17:28:10 +02:00
vm tools/vm/page-types.c: fix "defined but not used" warning 2018-10-10 08:52:11 +02:00
Makefile tools: Add a "make all" rule 2015-11-12 18:58:10 -03:00