commit | 6d8855adce92a0522c1206aa36459cd8f58b1740 | [log] [tgz] |
---|---|---|
author | Yunfeng Ye <[email protected]> | Wed Oct 16 16:38:45 2019 +0800 |
committer | Greg Kroah-Hartman <[email protected]> | Sun Nov 10 11:23:16 2019 +0100 |
tree | 34a1768f7b4cab59b237e8ef4953f1bc8e2b6d47 | |
parent | cc087a74200206a88e3664466a5aa4c58c683283 [diff] |
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: 0e11115644b3 ("perf kmem: Print gfp flags in human readable string") Signed-off-by: Yunfeng Ye <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Feilong Lin <[email protected]> Cc: Hu Shiyuan <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Sasha Levin <[email protected]>