Hi,

+++ b/src/service.c
@@ -4022,8 +4022,10 @@ static DBusMessage *connect_service(DBusConnection *conn,
      if (err == -EINPROGRESS)
          return NULL;
  -    dbus_message_unref(service->pending);
-    service->pending = NULL;
+    if (service->pending) {
+        dbus_message_unref(service->pending);
+        service->pending = NULL;
+    }
        if (err < 0)
          return __connman_error_failed(msg, -err);
What is this fixing?

dbus_message_unref() handles NULL pointers relevantly, so there is no bug here.

see http://dbus.freedesktop.org/doc/api/html/dbus-message_8c_source.html#l01689

Tomasz


#0  __GI_raise (sig=6) at raise.c:67
#1  __GI_abort () at abort.c:91
#2  _dbus_abort () at dbus-sysdeps.c:94
#3 _dbus_warn_check_failed (format=0x403492c4 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus library.\n") at dbus-internals.c:290
#4  dbus_message_unref (message=<optimized out>) at dbus-message.c:1616
#5  dbus_message_unref (message=0x0) at dbus-message.c:1612
_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to