ACK ----- Original Message ----- From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> To: libvir-list@xxxxxxxxxx Sent: Tuesday, September 3, 2013 11:37:44 AM Subject: [PATCH] Fix crash in virDomainGetVcpuPinInfo python wrapper From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> It is possible to jump to the cleanup block before the cpumaps variable gets initialized. This will result in a VIR_FREE of an uninitializer pointer Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> --- python/libvirt-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/libvirt-override.c b/python/libvirt-override.c index d16b9a2..cc76c47 100644 --- a/python/libvirt-override.c +++ b/python/libvirt-override.c @@ -1769,7 +1769,7 @@ libvirt_virDomainGetVcpuPinInfo(PyObject *self ATTRIBUTE_UNUSED, virDomainPtr domain; PyObject *pyobj_domain, *pycpumaps = NULL; virDomainInfo dominfo; - unsigned char *cpumaps; + unsigned char *cpumaps = NULL; size_t cpumaplen, vcpu, pcpu; unsigned int flags; int i_retval, cpunum; -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list