Indicate scan failure event on parameter cloning failure
This is more consistent with the radio_add_work() error case. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
9f83f6a944
commit
f37d8a4da4
1 changed files with 2 additions and 4 deletions
|
@ -227,10 +227,8 @@ int wpa_supplicant_trigger_scan(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx = wpa_scan_clone_params(params);
|
ctx = wpa_scan_clone_params(params);
|
||||||
if (ctx == NULL)
|
if (!ctx ||
|
||||||
return -1;
|
radio_add_work(wpa_s, 0, "scan", 0, wpas_trigger_scan_cb, ctx) < 0)
|
||||||
|
|
||||||
if (radio_add_work(wpa_s, 0, "scan", 0, wpas_trigger_scan_cb, ctx) < 0)
|
|
||||||
{
|
{
|
||||||
wpa_scan_free_params(ctx);
|
wpa_scan_free_params(ctx);
|
||||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SCAN_FAILED "ret=-1");
|
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SCAN_FAILED "ret=-1");
|
||||||
|
|
Loading…
Reference in a new issue