GAS: Fix double-free on an error path
authorJouni Malinen <j@w1.fi>
Mon, 27 Jun 2016 15:30:11 +0000 (18:30 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 27 Jun 2016 15:34:39 +0000 (18:34 +0300)
commit1574fa1c6c56f49867e4ec644e5a2b30e1c607b1
tree5fbcfc56d05b1c11da72908e36536ec7cd23a61e
parentd6e93d3e09598f726729ccc54c116324ff9daa4c
GAS: Fix double-free on an error path

If radio_add_work() fails, gas_query_req() ended up freeing the query
payload and returning an error. This resulted in also the caller trying
to free the query payload. Fix this by not freeing the buffer within
gas_query_req() in error case to be consistent with the other error
cases.

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