From: Ian Rogers Date: Thu, 1 Feb 2024 00:15:02 +0000 (-0800) Subject: perf srcline: Add missed addr2line closes X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c7ba9d18ae47924a6ea6a47ca139779f58eb83c0;p=linux.git perf srcline: Add missed addr2line closes The child_process for addr2line sets in and out to -1 so that pipes get created. It is the caller's responsibility to close the pipes, finish_command doesn't do it. Add the missed closes. Fixes: b3801e791231 ("perf srcline: Simplify addr2line subprocess") Signed-off-by: Ian Rogers Cc: Ravi Bangoria Cc: James Clark Cc: Nick Desaulniers Cc: Nathan Chancellor Cc: Kan Liang Cc: John Garry Cc: Tom Rix Cc: llvm@lists.linux.dev Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240201001504.1348511-8-irogers@google.com --- diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c index 034b496df2978..7addc34afcf5d 100644 --- a/tools/perf/util/srcline.c +++ b/tools/perf/util/srcline.c @@ -399,6 +399,8 @@ static void addr2line_subprocess_cleanup(struct child_process *a2l) kill(a2l->pid, SIGKILL); finish_command(a2l); /* ignore result, we don't care */ a2l->pid = -1; + close(a2l->in); + close(a2l->out); } free(a2l);