[maemo-commits] [maemo-commits] r14499 - in projects/haf/trunk/dbus/debian: . patches

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Oct 18 13:49:40 EEST 2007
Author: kihamala
Date: 2007-10-18 13:49:38 +0300 (Thu, 18 Oct 2007)
New Revision: 14499

Added:
   projects/haf/trunk/dbus/debian/patches/22-no-unref-in-auth-case.patch
Modified:
   projects/haf/trunk/dbus/debian/changelog
Log:
added patch for not unreffing an authenticated connection


Modified: projects/haf/trunk/dbus/debian/changelog
===================================================================
--- projects/haf/trunk/dbus/debian/changelog	2007-10-18 09:53:15 UTC (rev 14498)
+++ projects/haf/trunk/dbus/debian/changelog	2007-10-18 10:49:38 UTC (rev 14499)
@@ -3,10 +3,13 @@
   * Added dbus-dbg package. Fixes: NB#70750
   * Fixed a possible segfault in dbus_connection_send_with_reply when the
     connection has been disconnected.
+
+  Bugs discovered by statical code analysis:
   * Fixed a double free which could have happened after calling
-    _dbus_connection_close_if_only_one_ref. Discovered by statical code
-    analysis.
+    _dbus_connection_close_if_only_one_ref.
   * Added a missing va_end call to dbus_set_error.
+  * Not unreffing an authenticated connection in
+    _dbus_transport_get_is_authenticated.
 
  -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Thu, 18 Oct 2007 11:21:11 +0300
 

Added: projects/haf/trunk/dbus/debian/patches/22-no-unref-in-auth-case.patch
===================================================================
--- projects/haf/trunk/dbus/debian/patches/22-no-unref-in-auth-case.patch	2007-10-18 09:53:15 UTC (rev 14498)
+++ projects/haf/trunk/dbus/debian/patches/22-no-unref-in-auth-case.patch	2007-10-18 10:49:38 UTC (rev 14499)
@@ -0,0 +1,16 @@
+diff -pur dbus-1.0.2/dbus/dbus-transport.c dbus-1.0.2.new/dbus/dbus-transport.c
+--- dbus-1.0.2/dbus/dbus-transport.c	2006-12-11 21:21:06.000000000 +0200
++++ dbus-1.0.2.new/dbus/dbus-transport.c	2007-10-18 13:45:08.798097424 +0300
+@@ -635,7 +635,11 @@ _dbus_transport_get_is_authenticated (DB
+       
+       transport->authenticated = maybe_authenticated;
+ 
+-      _dbus_connection_unref_unlocked (transport->connection);
++      if (!maybe_authenticated)
++        {
++          _dbus_transport_disconnect (transport);
++          _dbus_connection_unref_unlocked (transport->connection);
++        }
+       return maybe_authenticated;
+     }
+ }


More information about the maemo-commits mailing list