From: George Joseph Date: Tue, 5 Mar 2024 19:12:08 +0000 (-0700) Subject: attestation_config.c: Use ast_free instead of ast_std_free X-Git-Tag: 21.2.0-rc1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c085753c2e92f9a21ba796e9898a63808e7ec209;p=thirdparty%2Fasterisk.git 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 (cherry picked from commit 1b94c905245840bdfa13330e0f3c1e441d6127f5) --- diff --git a/res/res_stir_shaken/attestation_config.c b/res/res_stir_shaken/attestation_config.c index 7c74fe3cd4..d7efc9e475 100644 --- a/res/res_stir_shaken/attestation_config.c +++ b/res/res_stir_shaken/attestation_config.c @@ -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) {