diff --git a/python/libvirt-override.c b/python/libvirt-override.c index a71766a59321330cc0faebb531cdc25f61c407f1..2447ad7052dce38f6c3ced3fa48a4afc2b1eb794 100644 --- a/python/libvirt-override.c +++ b/python/libvirt-override.c @@ -4,7 +4,7 @@ * 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 */ @@ -2046,8 +2046,10 @@ libvirt_virConnectBaselineCPU(PyObject *self ATTRIBUTE_UNUSED, 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; + } } }