Re: [PATCH 3/6] Remove bogus unref in virDBusMessageRead

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

 



On 20.03.2014 13:28, Daniel P. Berrange wrote:
The virDBusMessageRead method should not have side-effects on
the message parameter passed in, so unref'ing it is wrong.
The caller should unref only when they decided they are done
with it.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
  src/util/virdbus.c | 1 -
  1 file changed, 1 deletion(-)

diff --git a/src/util/virdbus.c b/src/util/virdbus.c
index d5d3e01..85f8e29 100644
--- a/src/util/virdbus.c
+++ b/src/util/virdbus.c
@@ -1419,7 +1419,6 @@ int virDBusMessageRead(DBusMessage *msg,
      ret = virDBusMessageDecodeArgs(msg, types, args);
      va_end(args);

-    dbus_message_unref(msg);
      return ret;
  }



ACK, and there's no new mem leak as this functions is not used anywhere yet.

Michal

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