Skip to content

Commit

Permalink
perf tools: Fix possible double free on error
Browse files Browse the repository at this point in the history
Can only be triggered via CROSS_COMPILE env var.

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Link: http://lkml.kernel.org/r/36736865.AIlztKhDqN@storm
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Thomas Jarosch authored and Arnaldo Carvalho de Melo committed Jan 30, 2013
1 parent e3541ec commit 68c465a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/perf/arch/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ static int perf_session_env__lookup_binutils_path(struct perf_session_env *env,
if (lookup_path(buf))
goto out;
free(buf);
buf = NULL;
}

if (!strcmp(arch, "arm"))
Expand Down

0 comments on commit 68c465a

Please sign in to comment.