attestation_config.c: Use ast_free instead of ast_std_free

In as_check_common_config, we were calling ast_std_free on
raw_key but raw_key was allocated with ast_malloc so it
should be freed with ast_free.

Resolves: #636
This commit is contained in:
George Joseph 2024-03-05 12:12:08 -07:00 committed by asterisk-org-access-app[bot]
parent 9a9aa9708d
commit d478002ad5
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ int as_check_common_config(const char *id, struct attestation_cfg_common *acfg_c
if (!ast_strlen_zero(acfg_common->private_key_file)) {
EVP_PKEY *private_key;
RAII_VAR(unsigned char *, raw_key, NULL, ast_std_free);
RAII_VAR(unsigned char *, raw_key, NULL, ast_free);
private_key = crypto_load_privkey_from_file(acfg_common->private_key_file);
if (!private_key) {