mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Fix leaks in python bindings
https://bugzilla.redhat.com/show_bug.cgi?id=1003828
This commit is contained in:
parent
b46c4787dd
commit
418137663f
@ -92,6 +92,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
VIR_FREE(fdlist);
|
||||||
return py_retval;
|
return py_retval;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <libvirt/virterror.h>
|
#include <libvirt/virterror.h>
|
||||||
#include "typewrappers.h"
|
#include "typewrappers.h"
|
||||||
#include "libvirt-qemu.h"
|
#include "libvirt-qemu.h"
|
||||||
|
#include "viralloc.h"
|
||||||
|
|
||||||
#ifndef __CYGWIN__
|
#ifndef __CYGWIN__
|
||||||
extern void initlibvirtmod_qemu(void);
|
extern void initlibvirtmod_qemu(void);
|
||||||
@ -79,6 +80,7 @@ libvirt_qemu_virDomainQemuMonitorCommand(PyObject *self ATTRIBUTE_UNUSED,
|
|||||||
return VIR_PY_NONE;
|
return VIR_PY_NONE;
|
||||||
|
|
||||||
py_retval = PyString_FromString(result);
|
py_retval = PyString_FromString(result);
|
||||||
|
VIR_FREE(result);
|
||||||
return py_retval;
|
return py_retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,6 +110,7 @@ libvirt_qemu_virDomainQemuAgentCommand(PyObject *self ATTRIBUTE_UNUSED, PyObject
|
|||||||
return VIR_PY_NONE;
|
return VIR_PY_NONE;
|
||||||
|
|
||||||
py_retval = PyString_FromString(result);
|
py_retval = PyString_FromString(result);
|
||||||
|
VIR_FREE(result);
|
||||||
return py_retval;
|
return py_retval;
|
||||||
}
|
}
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user