scan: Fix a memory leak on an error path
authorJouni Malinen <j@w1.fi>
Sun, 22 May 2016 15:09:23 +0000 (18:09 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 23 May 2016 15:29:55 +0000 (18:29 +0300)
commit6dc3206ef056a6682cbc9bfd6b2ccf97b9695294
tree8b37c5631b5e2ac50f66bff03dbdc036274f2c60
parent9ce3e61091c93a065a15e089b101cc85b5582d65
scan: Fix a memory leak on an error path

If preassoc_mac_addr is used and updating the MAC address fails in
wpas_trigger_scan_cb(), the cloned scan parameters were leaked. Fix that
and also send a CTRL-EVENT-SCAN-FAILED event in this and another error
case.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/scan.c