DPP: Fix an error path memory leak in URI public key parsing
The allocated buffer from base64_decode() needs to be freed on the sha256_vector() error path. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
e662260162
commit
bae282e3e8
1 changed files with 1 additions and 0 deletions
|
@ -840,6 +840,7 @@ static int dpp_parse_uri_pk(struct dpp_bootstrap_info *bi, const char *info)
|
|||
if (sha256_vector(1, (const u8 **) &data, &data_len,
|
||||
bi->pubkey_hash) < 0) {
|
||||
wpa_printf(MSG_DEBUG, "DPP: Failed to hash public key");
|
||||
os_free(data);
|
||||
return -1;
|
||||
}
|
||||
wpa_hexdump(MSG_DEBUG, "DPP: Public key hash",
|
||||
|
|
Loading…
Reference in a new issue