]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/intel: Plug memory leak in intel_pmu_init()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 27 Dec 2017 18:45:31 +0000 (19:45 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 27 Dec 2017 19:23:59 +0000 (20:23 +0100)
commiteee8e75ae1e68a4e6f6eabe1a5e1e0efbad8686b
treeb518b1fd266c0f025683e91178ecd42e283b55bc
parente38f036ba42ccc5deb642df0c0c3919994a4bec0
perf/x86/intel: Plug memory leak in intel_pmu_init()

A recent commit introduced an extra merge_attr() call in the skylake
branch, which causes a memory leak.

Store the pointer to the extra allocated memory and free it at the end of
the function.

Fixes: 28484d875845 ("perf/x86: Only show format attributes when supported")
Reported-by: Tommi Rantala <tommi.t.rantala@nokia.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@linux.intel.com>
arch/x86/events/intel/core.c