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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-01-06 23:13:28 +02:00
parent 96dc9a6d42
commit 52b3943c94

View file

@ -3227,7 +3227,7 @@ int wpas_dbus_unregister_interface(struct wpa_supplicant *wpa_s)
if (wpa_s == NULL || wpa_s->global == NULL) if (wpa_s == NULL || wpa_s->global == NULL)
return 0; return 0;
ctrl_iface = wpa_s->global->dbus; ctrl_iface = wpa_s->global->dbus;
if (ctrl_iface == NULL) if (ctrl_iface == NULL || wpa_s->dbus_new_path == NULL)
return 0; return 0;
wpa_printf(MSG_DEBUG, "dbus: Unregister interface object '%s'", wpa_printf(MSG_DEBUG, "dbus: Unregister interface object '%s'",