DPP2: Fix a memory leak on error path for Config Result
If only one of the allocations fails, the successful allocation needs to
be freed on the error path.
Fixes: 22f90b32f1
("DPP2: Configuration Result message generation and processing")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
21dc1627f6
commit
3a6736fe87
1 changed files with 1 additions and 1 deletions
|
@ -6108,7 +6108,7 @@ struct wpabuf * dpp_build_conf_result(struct dpp_authentication *auth,
|
|||
clear = wpabuf_alloc(clear_len);
|
||||
msg = dpp_alloc_msg(DPP_PA_CONFIGURATION_RESULT, attr_len);
|
||||
if (!clear || !msg)
|
||||
return NULL;
|
||||
goto fail;
|
||||
|
||||
/* DPP Status */
|
||||
dpp_build_attr_status(clear, status);
|
||||
|
|
Loading…
Reference in a new issue