[libvirt] [libvirt-python PATCH] fix leak in memoryStats with older python

Michal Privoznik mprivozn at redhat.com
Fri May 30 17:30:32 UTC 2014


On 27.05.2014 17:28, Martin Kletzander wrote:
> libvirt_virDomainMemoryStats() function creates a dictionary without
> any checks whether the additions were successful, whether the python
> objects were created and, most importantly, without decrementing the
> reference count on the objects added to the dictionary.  This is
> somehow not an issue with current upstream versions, however with
> python 2.6 this exposes a leak in our bindings.  The following patch
> works on both old and new CPython versions and is already used in
> other parts of the code, so it's also most straightforward.
>
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
>   libvirt-override.c | 68 +++++++++++++++++++++++++++++++++++-------------------
>   1 file changed, 44 insertions(+), 24 deletions(-)

ACK and safe for the freeze.

Michal




More information about the libvir-list mailing list