From: Sami Kerola Date: Sun, 13 Jul 2014 17:30:32 +0000 (+0100) Subject: lscpu: avoid double free X-Git-Tag: v2.25~75^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e6604e51a5460653cd1189c51f5935ae0cde550;p=thirdparty%2Futil-linux.git lscpu: avoid double free The double free was possible for architectures other than x86_64 or i386. Signed-off-by: Sami Kerola --- 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) */