Commit 275ae411 authored by Vincent Stehlé's avatar Vincent Stehlé Committed by Thomas Gleixner

perf/x86/intel/rapl: Fix pmus free during cleanup

On rapl cleanup path, kfree() is given by mistake the address of the
pointer of the structure to free (rapl_pmus->pmus + i). Pass the pointer
instead (rapl_pmus->pmus[i]).

Fixes: 9de8d686 "perf/x86/intel/rapl: Convert it to a per package facility"
Signed-off-by: default avatarVincent Stehlé <vincent.stehle@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1464101629-14905-1-git-send-email-vincent.stehle@intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 0c9f790f
......@@ -714,7 +714,7 @@ static void cleanup_rapl_pmus(void)
int i;
for (i = 0; i < rapl_pmus->maxpkg; i++)
kfree(rapl_pmus->pmus + i);
kfree(rapl_pmus->pmus[i]);
kfree(rapl_pmus);
}
......
Markdown is supported
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