]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
GAS: Fix memory leak on some DPP error paths
authorJouni Malinen <j@w1.fi>
Sat, 22 Aug 2020 20:47:44 +0000 (23:47 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 22 Aug 2020 20:47:44 +0000 (23:47 +0300)
One of the code paths left behind a response buffer. Free this properly
on this missed code path as well.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/gas_server.c

index 5a1ea78997be4626be5dbf14b7a9c7a4e9c16a5b..c000aeb6060f0f3d4144eda25a0aab8257a6f229 100644 (file)
@@ -96,8 +96,10 @@ gas_server_send_resp(struct gas_server *gas, struct gas_server_handler *handler,
        size_t resp_frag_len;
        struct wpabuf *resp;
 
-       if (comeback_delay == 0 && !query_resp)
+       if (comeback_delay == 0 && !query_resp) {
+               gas_server_free_response(response);
                return;
+       }
 
        response->freq = freq;
        response->handler = handler;