kernel_samsung_a53x/tools/lib
Ian Rogers 126f14cadc libsubcmd: Fix memory leak in uniq()
[ Upstream commit ad30469a841b50dbb541df4d6971d891f703c297 ]

uniq() will write one command name over another causing the overwritten
string to be leaked. Fix by doing a pass that removes duplicates and a
second that removes the holes.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Chenyuan Mi <cymi20@fudan.edu.cn>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20231208000515.1693746-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:13:20 +01:00
..
api libapi: Add missing linux/types.h header to get the __u64 type on io.h 2024-11-18 12:12:49 +01:00
bpf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lockdep Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
subcmd libsubcmd: Fix memory leak in uniq() 2024-11-18 12:13:20 +01:00
symbol Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
traceevent Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
argv_split.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bitmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ctype.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
find_bit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hweight.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rbtree.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
str_error_r.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
string.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsprintf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zalloc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00