summaryrefslogtreecommitdiffstats
path: root/sys-utils/lscpu-dmi.c
diff options
context:
space:
mode:
authorSami Kerola2014-07-13 19:30:32 +0200
committerSami Kerola2014-07-13 19:35:39 +0200
commit4e6604e51a5460653cd1189c51f5935ae0cde550 (patch)
tree5929d1b7d65620420325516fe486466cab358049 /sys-utils/lscpu-dmi.c
parentlibsmartcols: avoid variable dereference after release (diff)
downloadkernel-qcow2-util-linux-4e6604e51a5460653cd1189c51f5935ae0cde550.tar.gz
kernel-qcow2-util-linux-4e6604e51a5460653cd1189c51f5935ae0cde550.tar.xz
kernel-qcow2-util-linux-4e6604e51a5460653cd1189c51f5935ae0cde550.zip
lscpu: avoid double free
The double free was possible for architectures other than x86_64 or i386. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/lscpu-dmi.c')
-rw-r--r--sys-utils/lscpu-dmi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c
index 251d4acc4..6c870a113 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) */