[libvirt] [PATCH v3 7/7] python: add bindings for virConnectGetCPUModelNames
Eric Blake
eblake at redhat.com
Fri Sep 13 22:47:23 UTC 2013
On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote:
> Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
> ---
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130913/84c0f3fb/attachment-0001.sig>
More information about the libvir-list
mailing list