* python/libvirt-override.c (libvirt_virConnectBaselineCPU): Don't leak
the xmlcpus buffer upon encountering a non-string list element.
* entry points where an automatically generated stub is
* unpractical
*
- * Copyright (C) 2005, 2007-2009 Red Hat, Inc.
+ * Copyright (C) 2005, 2007-2010 Red Hat, Inc.
*
* Daniel Veillard <veillard@redhat.com>
*/
for (i = 0; i < ncpus; i++) {
xmlcpus[i] = PyString_AsString(PyList_GetItem(list, i));
- if (xmlcpus[i] == NULL)
+ if (xmlcpus[i] == NULL) {
+ free(xmlcpus);
return VIR_PY_INT_FAIL;
+ }
}
}