From 4e6604e51a5460653cd1189c51f5935ae0cde550 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 13 Jul 2014 18:30:32 +0100 Subject: [PATCH] lscpu: avoid double free The double free was possible for architectures other than x86_64 or i386. Signed-off-by: Sami Kerola --- sys-utils/lscpu-dmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c index 251d4acc40..6c870a1134 100644 --- a/sys-utils/lscpu-dmi.c +++ b/sys-utils/lscpu-dmi.c @@ -258,7 +258,7 @@ int read_hypervisor_dmi(void) if (rc) goto done; free(buf); - + buf = NULL; memory_scan: #if defined(__x86_64__) || defined(__i386__) /* Fallback to memory scan (x86, x86_64) */ -- 2.47.2