From d478002ad51eade1d34496f804bc304c706f471f Mon Sep 17 00:00:00 2001 From: George Joseph Date: Tue, 5 Mar 2024 12:12:08 -0700 Subject: [PATCH] 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 --- res/res_stir_shaken/attestation_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {