From: Jouni Malinen Date: Tue, 6 Jan 2015 21:07:12 +0000 (+0200) Subject: D-Bus (old): Fix interface unregistration on error path X-Git-Tag: hostap_2_4~512 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96dc9a6d420b168bcebb10ed75e2f93177696979;p=thirdparty%2Fhostap.git D-Bus (old): Fix interface unregistration on error path It is possible for this function to be called even if D-Bus interface registration has failed. Avoid a D-Bus assert in such a case. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/dbus/dbus_old.c b/wpa_supplicant/dbus/dbus_old.c index 1c8568688..45bb40227 100644 --- a/wpa_supplicant/dbus/dbus_old.c +++ b/wpa_supplicant/dbus/dbus_old.c @@ -712,7 +712,7 @@ int wpas_dbus_unregister_iface(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_path == NULL) return 0; con = ctrl_iface->con;