]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
attestation_config.c: Use ast_free instead of ast_std_free
authorGeorge Joseph <gjoseph@sangoma.com>
Tue, 5 Mar 2024 19:12:08 +0000 (12:12 -0700)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 7 Mar 2024 14:18:41 +0000 (14:18 +0000)
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)

res/res_stir_shaken/attestation_config.c

index 7c74fe3cd414fcb5aafc8df6b1258f126e9064d1..d7efc9e4752352fd44ffdbb836b8a16462ede269 100644 (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) {