Commit 4a18ab46 authored by zhaimingbing's avatar zhaimingbing Committed by Arnaldo Carvalho de Melo
Browse files

perf lock: Fix a memory leak on an error path



if a strdup-ed string is NULL,the allocated memory needs freeing.

Signed-off-by: default avatarzhaimingbing <zhaimingbing@cmss.chinamobile.com>
Acked-by: default avatarIngo Molnar <mingo@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Li Dong <lidong@vivo.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20231124092657.10392-1-zhaimingbing@cmss.chinamobile.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent a24d9d9d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment