From: Jouni Malinen Date: Tue, 6 Jan 2015 21:13:28 +0000 (+0200) Subject: D-Bus: Fix interface unregistration on error path X-Git-Tag: hostap_2_4~511 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52b3943c94650618cadb2839c12a5a2eec88b0af;p=thirdparty%2Fhostap.git D-Bus: Fix interface unregistration on error path It is possible for this function to get called even if D-Bus registration had failed, so the path can be NULL here. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index b21b7a864..b30cc389f 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -3227,7 +3227,7 @@ int wpas_dbus_unregister_interface(struct wpa_supplicant *wpa_s) if (wpa_s == NULL || wpa_s->global == NULL) return 0; ctrl_iface = wpa_s->global->dbus; - if (ctrl_iface == NULL) + if (ctrl_iface == NULL || wpa_s->dbus_new_path == NULL) return 0; wpa_printf(MSG_DEBUG, "dbus: Unregister interface object '%s'",