From: Karel Zak Date: Wed, 13 May 2020 11:33:13 +0000 (+0200) Subject: lscpu: fix mem-leak in cpu X-Git-Tag: v2.37-rc1~367 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=617d8fbec5a7075f3027108f368813a1eb231a1c;p=thirdparty%2Futil-linux.git lscpu: fix mem-leak in cpu Signed-off-by: Karel Zak --- diff --git a/sys-utils/lscpu-cpu.c b/sys-utils/lscpu-cpu.c index b8de1bbe46..81e3f691c6 100644 --- a/sys-utils/lscpu-cpu.c +++ b/sys-utils/lscpu-cpu.c @@ -26,6 +26,9 @@ void lscpu_unref_cpu(struct lscpu_cpu *cpu) if (--cpu->refcount <= 0) { DBG(CPU, ul_debugobj(cpu, " freeing")); lscpu_unref_cputype(cpu->type); + free(cpu->dynamic_mhz); + free(cpu->static_mhz); + free(cpu->mhz); free(cpu); } }