SHA256
1
0
forked from pool/libvirt
libvirt/2dc1cf19-libxl-double-free.patch

28 lines
908 B
Diff
Raw Normal View History

commit 2dc1cf19dbaf648662fbf3c810db65ddcf5d0444
Author: Jim Fehlig <jfehlig@suse.com>
Date: Wed Feb 15 10:45:27 2017 -0700
libxl: fix potential double free in libxlDriverGetDom0MaxmemConf
Commit 4ab0c959 fixed a memory leak in libxlDriverGetDom0MaxmemConf
but introduced a potential double free of mem_tokens
*** Error in `/usr/sbin/libvirtd': double free or corruption (out):
0x00007fffc808cfd0 ***
Avoid double free by setting mem_tokens to NULL after calling
virStringListFree.
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
@@ -1623,6 +1623,7 @@ libxlDriverGetDom0MaxmemConf(libxlDriver
}
}
virStringListFree(mem_tokens);
+ mem_tokens = NULL;
}
physmem: