]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
D-Bus: Fix per-iface object unregistration on not existing objects
authorJouni Malinen <j@w1.fi>
Sat, 31 Aug 2013 13:46:24 +0000 (16:46 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 31 Aug 2013 13:46:24 +0000 (16:46 +0300)
If the private data for an object is not found, do not try to unregister
that object to avoid D-Bus errors.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/dbus/dbus_new_helpers.c

index cfa6a15162a376692f2dde5ba9da7a006f1c5a32..e26086dd158590d1d251a95a3fa7e033a92f0779 100644 (file)
@@ -590,11 +590,11 @@ int wpa_dbus_unregister_object_per_iface(
        if (!obj_desc) {
                wpa_printf(MSG_ERROR, "dbus: %s: Could not obtain object's "
                           "private data: %s", __func__, path);
-       } else {
-               eloop_cancel_timeout(flush_object_timeout_handler, con,
-                                    obj_desc);
+               return 0;
        }
 
+       eloop_cancel_timeout(flush_object_timeout_handler, con, obj_desc);
+
        if (!dbus_connection_unregister_object_path(con, path))
                return -1;