Skip to content
Commit ef5de161 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Namhyung Kim
Browse files

perf pmu: Fix a potential memory leak in perf_pmu__lookup()

The commit in Fixes has reordered some code, but missed an error handling
path.

'goto err' now, in order to avoid a memory leak in case of error.

Fixes: f63a536f

 ("perf pmu: Merge JSON events with sysfs at load time")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarIan Rogers <irogers@google.com>
Cc: kernel-janitors@vger.kernel.org
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/9538b2b634894c33168dfe9d848d4df31fd4d801.1693085544.git.christophe.jaillet@wanadoo.fr
parent eb94225e
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