On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote: > Signed-off-by: Giuseppe Scrivano <[email protected]> > --- > python/generator.py | 2 +- > python/libvirt-override-api.xml | 7 ++++++ > python/libvirt-override.c | 52 > +++++++++++++++++++++++++++++++++++++++++ > python/libvirt-override.py | 11 +++++++++ > 4 files changed, 71 insertions(+), 1 deletion(-) >
> + goto error;
> +
> + PyList_SET_ITEM(rv, i, str);
> + }
> +
> +done:
> + if (models) {
> + for (i = 0; i < c_retval; i++)
> + VIR_FREE(models[i]);
> + VIR_FREE(models);
> + }
> +
> + return rv;
> +
> +error:
> + Py_XDECREF(rv);
> + rv = VIR_PY_INT_FAIL;
> + goto done;
Oh bother - time for me to call it a weekend. I thought you were
_returning_ VIR_PY_INT_FAIL here without touching models, but you are
correctly jumping back to 'done' to get the cleanup. Looks like you
don't have a leak after all.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
