dbus_server_set_auth_mechanisms: Fix returning without unlocking server->mutex->lock...
authorRalf Habacker <ralf.habacker@freenet.de>
Wed, 22 Apr 2015 12:47:08 +0000 (14:47 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Tue, 28 Apr 2015 20:57:45 +0000 (22:57 +0200)
Reported by Coverity: CID 54749: Missing unlock (LOCK)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus/dbus-server.c

index c1d5f6e..7b81079 100644 (file)
@@ -1043,7 +1043,10 @@ dbus_server_set_auth_mechanisms (DBusServer  *server,
     {
       copy = _dbus_dup_string_array (mechanisms);
       if (copy == NULL)
-        return FALSE;
+        {
+          SERVER_UNLOCK (server);
+          return FALSE;
+        }
     }
   else
     copy = NULL;