[libnet-dbus-perl] 250/335: Fixed a couple of ref counting bugs in error case codepath

Intrigeri intrigeri at moszumanska.debian.org
Sat Mar 21 01:08:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch experimental
in repository libnet-dbus-perl.

commit b203042107b7a3f5dc976f4514d590f4966a183a
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Wed Jul 18 23:13:25 2007 -0400

    Fixed a couple of ref counting bugs in error case codepath
---
 DBus.xs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/DBus.xs b/DBus.xs
index 4106bd5..76bffb1 100644
--- a/DBus.xs
+++ b/DBus.xs
@@ -528,10 +528,10 @@ _open(address)
 	dbus_error_init(&error);
         DEBUG_MSG("Open connection shared %s\n", address);
 	con = dbus_connection_open(address, &error);
-        dbus_connection_ref(con);
 	if (!con) {
 	  _croak_error (&error);
 	}
+        dbus_connection_ref(con);
 	RETVAL = con;
     OUTPUT:
 	RETVAL
@@ -546,10 +546,10 @@ _open_private(address)
 	dbus_error_init(&error);
         DEBUG_MSG("Open connection private %s\n", address);
 	con = dbus_connection_open_private(address, &error);
-        dbus_connection_ref(con);
 	if (!con) {
 	  _croak_error (&error);
 	}
+        dbus_connection_ref(con);
 	RETVAL = con;
     OUTPUT:
 	RETVAL
@@ -909,10 +909,10 @@ _open(type)
 	dbus_error_init(&error);
         DEBUG_MSG("Open bus shared %d\n", type);
 	con = dbus_bus_get(type, &error);
-        dbus_connection_ref(con);
 	if (!con) {
 	  _croak_error(&error);
 	}
+        dbus_connection_ref(con);
 	RETVAL = con;
     OUTPUT:
 	RETVAL
@@ -927,10 +927,10 @@ _open_private(type)
 	dbus_error_init(&error);
         DEBUG_MSG("Open bus private %d\n", type);
 	con = dbus_bus_get_private(type, &error);
-        dbus_connection_ref(con);
 	if (!con) {
 	  _croak_error(&error);
 	}
+        dbus_connection_ref(con);
 	RETVAL = con;
     OUTPUT:
 	RETVAL

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git



More information about the Pkg-perl-cvs-commits mailing list