dbus: Fix error path in scan request handling

In case the scan request handling fails, exit cleanly, i.e., without
setting internal state such as the 'scan_res_handler' pointer.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
Ilan Peer 2024-06-30 19:39:46 +03:00 committed by Jouni Malinen
parent 7f3fe956d8
commit e5f76b9153

View file

@ -1731,6 +1731,7 @@ DBusMessage * wpas_dbus_handler_scan(DBusMessage *message,
reply = wpas_dbus_error_scan_error(
message,
"Scan request rejected");
goto out;
}
} else {
wpa_s->scan_req = MANUAL_SCAN_REQ;
@ -1757,6 +1758,7 @@ DBusMessage * wpas_dbus_handler_scan(DBusMessage *message,
false)) {
reply = wpas_dbus_error_scan_error(
message, "Scan request rejected");
goto out;
}
} else {
wpa_printf(MSG_DEBUG, "%s[dbus]: Unknown scan type: %s",