From: Jouni Malinen Date: Sat, 22 Aug 2020 20:47:44 +0000 (+0300) Subject: GAS: Fix memory leak on some DPP error paths X-Git-Tag: hostap_2_10~981 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4adbacafddae602e883a65686b87146d94ca488;p=thirdparty%2Fhostap.git GAS: Fix memory leak on some DPP error paths 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 --- diff --git a/src/common/gas_server.c b/src/common/gas_server.c index 5a1ea7899..c000aeb60 100644 --- a/src/common/gas_server.c +++ b/src/common/gas_server.c @@ -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;