diff --git a/python/libvirt-lxc-override.c b/python/libvirt-lxc-override.c index fa7e963a0f083eeedddaef7a0a47373f67fddbc1..f76ff4b6448ba1a4566b7961dac1ee8f656dba1d 100644 --- a/python/libvirt-lxc-override.c +++ b/python/libvirt-lxc-override.c @@ -92,6 +92,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED, goto error; } } + VIR_FREE(fdlist); return py_retval; error: diff --git a/python/libvirt-qemu-override.c b/python/libvirt-qemu-override.c index 8f1ce5e99b98cd11d457d908a9767488311f5322..6249031d7726f7287b92f851057896077c0bfb41 100644 --- a/python/libvirt-qemu-override.c +++ b/python/libvirt-qemu-override.c @@ -21,6 +21,7 @@ #include #include "typewrappers.h" #include "libvirt-qemu.h" +#include "viralloc.h" #ifndef __CYGWIN__ extern void initlibvirtmod_qemu(void); @@ -79,6 +80,7 @@ libvirt_qemu_virDomainQemuMonitorCommand(PyObject *self ATTRIBUTE_UNUSED, return VIR_PY_NONE; py_retval = PyString_FromString(result); + VIR_FREE(result); return py_retval; } @@ -108,6 +110,7 @@ libvirt_qemu_virDomainQemuAgentCommand(PyObject *self ATTRIBUTE_UNUSED, PyObject return VIR_PY_NONE; py_retval = PyString_FromString(result); + VIR_FREE(result); return py_retval; } /************************************************************************