|
|
43fe83 |
From ac031683b0c5e27992c02a981975fec432340584 Mon Sep 17 00:00:00 2001
|
|
|
43fe83 |
Message-Id: <ac031683b0c5e27992c02a981975fec432340584.1378475168.git.jdenemar@redhat.com>
|
|
|
43fe83 |
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
|
43fe83 |
Date: Tue, 3 Sep 2013 13:43:05 +0200
|
|
|
43fe83 |
Subject: [PATCH] Fix leaks in python bindings
|
|
|
43fe83 |
|
|
|
43fe83 |
https://bugzilla.redhat.com/show_bug.cgi?id=1003828
|
|
|
43fe83 |
(cherry picked from commit 418137663f1ca0877a176b996ac027d89747fe90)
|
|
|
43fe83 |
---
|
|
|
43fe83 |
python/libvirt-lxc-override.c | 1 +
|
|
|
43fe83 |
python/libvirt-qemu-override.c | 3 +++
|
|
|
43fe83 |
2 files changed, 4 insertions(+)
|
|
|
43fe83 |
|
|
|
43fe83 |
diff --git a/python/libvirt-lxc-override.c b/python/libvirt-lxc-override.c
|
|
|
43fe83 |
index 73685df..03bf2df 100644
|
|
|
43fe83 |
--- a/python/libvirt-lxc-override.c
|
|
|
43fe83 |
+++ b/python/libvirt-lxc-override.c
|
|
|
43fe83 |
@@ -92,6 +92,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED,
|
|
|
43fe83 |
goto error;
|
|
|
43fe83 |
}
|
|
|
43fe83 |
}
|
|
|
43fe83 |
+ VIR_FREE(fdlist);
|
|
|
43fe83 |
return py_retval;
|
|
|
43fe83 |
|
|
|
43fe83 |
error:
|
|
|
43fe83 |
diff --git a/python/libvirt-qemu-override.c b/python/libvirt-qemu-override.c
|
|
|
43fe83 |
index 8f1ce5e..6249031 100644
|
|
|
43fe83 |
--- a/python/libvirt-qemu-override.c
|
|
|
43fe83 |
+++ b/python/libvirt-qemu-override.c
|
|
|
43fe83 |
@@ -21,6 +21,7 @@
|
|
|
43fe83 |
#include <libvirt/virterror.h>
|
|
|
43fe83 |
#include "typewrappers.h"
|
|
|
43fe83 |
#include "libvirt-qemu.h"
|
|
|
43fe83 |
+#include "viralloc.h"
|
|
|
43fe83 |
|
|
|
43fe83 |
#ifndef __CYGWIN__
|
|
|
43fe83 |
extern void initlibvirtmod_qemu(void);
|
|
|
43fe83 |
@@ -79,6 +80,7 @@ libvirt_qemu_virDomainQemuMonitorCommand(PyObject *self ATTRIBUTE_UNUSED,
|
|
|
43fe83 |
return VIR_PY_NONE;
|
|
|
43fe83 |
|
|
|
43fe83 |
py_retval = PyString_FromString(result);
|
|
|
43fe83 |
+ VIR_FREE(result);
|
|
|
43fe83 |
return py_retval;
|
|
|
43fe83 |
}
|
|
|
43fe83 |
|
|
|
43fe83 |
@@ -108,6 +110,7 @@ libvirt_qemu_virDomainQemuAgentCommand(PyObject *self ATTRIBUTE_UNUSED, PyObject
|
|
|
43fe83 |
return VIR_PY_NONE;
|
|
|
43fe83 |
|
|
|
43fe83 |
py_retval = PyString_FromString(result);
|
|
|
43fe83 |
+ VIR_FREE(result);
|
|
|
43fe83 |
return py_retval;
|
|
|
43fe83 |
}
|
|
|
43fe83 |
/************************************************************************
|
|
|
43fe83 |
--
|
|
|
43fe83 |
1.8.3.2
|
|
|
43fe83 |
|