Re: [PATCH v3 7/7] python: add bindings for virConnectGetCPUModelNames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote:
> Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx>
> ---
>  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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]