[dbus PATCH 1/4] gdbus: fix memory and FD leak in virtDBusGDBusHandleMethod

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/gdbus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gdbus.c b/src/gdbus.c
index 3407116..2cce6ff 100644
--- a/src/gdbus.c
+++ b/src/gdbus.c
@@ -1,5 +1,6 @@
 #include "gdbus.h"
 
+#include <gio/gunixfdlist.h>
 #include <glib/gprintf.h>
 
 struct _virtDBusGDBusMethodData {
@@ -201,7 +202,7 @@ virtDBusGDBusHandleMethod(GVariant *parameters,
     GDBusMessage *msg = g_dbus_method_invocation_get_message(invocation);
     GUnixFDList *inFDs = NULL;
     GVariant *outArgs = NULL;
-    GUnixFDList *outFDs = NULL;
+    g_autoptr(GUnixFDList) outFDs = NULL;
     g_autoptr(GError) error = NULL;
 
     for (gint i = 0; data->methods[i].name; i++) {
-- 
2.17.0

--
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]

  Powered by Linux