aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-11-29 11:03:48 (GMT)
committerJouni Malinen <j@w1.fi>2017-11-29 11:03:48 (GMT)
commit622934128b9938c060aef0a4c5b96aad4436fd59 (patch)
tree7e13f8aaa6b0ae3e9ec0970fc6862189d427a7d2
parented62d4011600cb9a1eccad4cdab40e2fae4c3bef (diff)
downloadhostap-622934128b9938c060aef0a4c5b96aad4436fd59.zip
hostap-622934128b9938c060aef0a4c5b96aad4436fd59.tar.gz
hostap-622934128b9938c060aef0a4c5b96aad4436fd59.tar.bz2
DPP: Fix a memory leak on an error path
Need to free temporary allocations if dpp_build_conf_start() fails to allocate memory. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/common/dpp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/dpp.c b/src/common/dpp.c
index 74cddda..c70f73b 100644
--- a/src/common/dpp.c
+++ b/src/common/dpp.c
@@ -4149,7 +4149,7 @@ skip_groups:
tailroom += signed1_len + signed2_len + signed3_len;
buf = dpp_build_conf_start(auth, conf, tailroom);
if (!buf)
- return NULL;
+ goto fail;
wpabuf_put_str(buf, "\"cred\":{\"akm\":\"dpp\",\"signedConnector\":\"");
wpabuf_put_str(buf, signed1);