From 259de0e9f32d3e2c88ac6cdc32d2eba8262848ec Mon Sep 17 00:00:00 2001 From: Songling Han Date: Tue, 17 Sep 2024 04:57:11 +0000 Subject: [PATCH] [#1823] update memory allocator for copy_from_upstream Signed-off-by: Songling Han --- scripts/copy_from_upstream/src/kem/family/kem_scheme.c | 4 ++-- scripts/copy_from_upstream/src/sig/family/sig_scheme.c | 4 ++-- .../tests/kat_sig.c/combine_message_signature.fragment | 8 ++++---- src/kem/classic_mceliece/kem_classic_mceliece_348864.c | 2 +- src/kem/classic_mceliece/kem_classic_mceliece_348864f.c | 2 +- src/kem/classic_mceliece/kem_classic_mceliece_460896.c | 2 +- src/kem/classic_mceliece/kem_classic_mceliece_460896f.c | 2 +- src/kem/classic_mceliece/kem_classic_mceliece_6688128.c | 2 +- src/kem/classic_mceliece/kem_classic_mceliece_6688128f.c | 2 +- src/kem/classic_mceliece/kem_classic_mceliece_6960119.c | 2 +- src/kem/classic_mceliece/kem_classic_mceliece_6960119f.c | 2 +- src/kem/classic_mceliece/kem_classic_mceliece_8192128.c | 2 +- src/kem/classic_mceliece/kem_classic_mceliece_8192128f.c | 2 +- src/kem/hqc/kem_hqc_128.c | 2 +- src/kem/hqc/kem_hqc_192.c | 2 +- src/kem/hqc/kem_hqc_256.c | 2 +- src/kem/kyber/kem_kyber_1024.c | 2 +- src/kem/kyber/kem_kyber_512.c | 2 +- src/kem/kyber/kem_kyber_768.c | 2 +- src/kem/ml_kem/kem_ml_kem_1024.c | 2 +- src/kem/ml_kem/kem_ml_kem_512.c | 2 +- src/kem/ml_kem/kem_ml_kem_768.c | 2 +- src/sig/cross/sig_cross_rsdp_128_balanced.c | 2 +- src/sig/cross/sig_cross_rsdp_128_fast.c | 2 +- src/sig/cross/sig_cross_rsdp_128_small.c | 2 +- src/sig/cross/sig_cross_rsdp_192_balanced.c | 2 +- src/sig/cross/sig_cross_rsdp_192_fast.c | 2 +- src/sig/cross/sig_cross_rsdp_192_small.c | 2 +- src/sig/cross/sig_cross_rsdp_256_balanced.c | 2 +- src/sig/cross/sig_cross_rsdp_256_fast.c | 2 +- src/sig/cross/sig_cross_rsdp_256_small.c | 2 +- src/sig/cross/sig_cross_rsdpg_128_balanced.c | 2 +- src/sig/cross/sig_cross_rsdpg_128_fast.c | 2 +- src/sig/cross/sig_cross_rsdpg_128_small.c | 2 +- src/sig/cross/sig_cross_rsdpg_192_balanced.c | 2 +- src/sig/cross/sig_cross_rsdpg_192_fast.c | 2 +- src/sig/cross/sig_cross_rsdpg_192_small.c | 2 +- src/sig/cross/sig_cross_rsdpg_256_balanced.c | 2 +- src/sig/cross/sig_cross_rsdpg_256_fast.c | 2 +- src/sig/cross/sig_cross_rsdpg_256_small.c | 2 +- src/sig/dilithium/sig_dilithium_2.c | 2 +- src/sig/dilithium/sig_dilithium_3.c | 2 +- src/sig/dilithium/sig_dilithium_5.c | 2 +- src/sig/falcon/sig_falcon_1024.c | 2 +- src/sig/falcon/sig_falcon_512.c | 2 +- src/sig/falcon/sig_falcon_padded_1024.c | 2 +- src/sig/falcon/sig_falcon_padded_512.c | 2 +- src/sig/mayo/sig_mayo_1.c | 2 +- src/sig/mayo/sig_mayo_2.c | 2 +- src/sig/mayo/sig_mayo_3.c | 2 +- src/sig/mayo/sig_mayo_5.c | 2 +- src/sig/ml_dsa/sig_ml_dsa_44_ipd.c | 4 ++-- src/sig/ml_dsa/sig_ml_dsa_65_ipd.c | 4 ++-- src/sig/ml_dsa/sig_ml_dsa_87_ipd.c | 4 ++-- src/sig/sphincs/sig_sphincs_sha2_128f_simple.c | 2 +- src/sig/sphincs/sig_sphincs_sha2_128s_simple.c | 2 +- src/sig/sphincs/sig_sphincs_sha2_192f_simple.c | 2 +- src/sig/sphincs/sig_sphincs_sha2_192s_simple.c | 2 +- src/sig/sphincs/sig_sphincs_sha2_256f_simple.c | 2 +- src/sig/sphincs/sig_sphincs_sha2_256s_simple.c | 2 +- src/sig/sphincs/sig_sphincs_shake_128f_simple.c | 2 +- src/sig/sphincs/sig_sphincs_shake_128s_simple.c | 2 +- src/sig/sphincs/sig_sphincs_shake_192f_simple.c | 2 +- src/sig/sphincs/sig_sphincs_shake_192s_simple.c | 2 +- src/sig/sphincs/sig_sphincs_shake_256f_simple.c | 2 +- src/sig/sphincs/sig_sphincs_shake_256s_simple.c | 2 +- 66 files changed, 74 insertions(+), 74 deletions(-) diff --git a/scripts/copy_from_upstream/src/kem/family/kem_scheme.c b/scripts/copy_from_upstream/src/kem/family/kem_scheme.c index 2560d17942..108078ffcd 100644 --- a/scripts/copy_from_upstream/src/kem/family/kem_scheme.c +++ b/scripts/copy_from_upstream/src/kem/family/kem_scheme.c @@ -11,7 +11,7 @@ {% endif %} OQS_KEM *OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } @@ -42,7 +42,7 @@ OQS_KEM *OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_new(void) { /** Alias */ OQS_KEM *OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/scripts/copy_from_upstream/src/sig/family/sig_scheme.c b/scripts/copy_from_upstream/src/sig/family/sig_scheme.c index fcb364be71..235c857301 100644 --- a/scripts/copy_from_upstream/src/sig/family/sig_scheme.c +++ b/scripts/copy_from_upstream/src/sig/family/sig_scheme.c @@ -11,7 +11,7 @@ {% endif %} OQS_SIG *OQS_SIG_{{ family }}_{{ scheme['scheme'] }}_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } @@ -41,7 +41,7 @@ OQS_SIG *OQS_SIG_{{ family }}_{{ scheme['scheme'] }}_new(void) { /** Alias */ OQS_SIG *OQS_SIG_{{ family }}_{{ scheme['alias_scheme'] }}_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/scripts/copy_from_upstream/tests/kat_sig.c/combine_message_signature.fragment b/scripts/copy_from_upstream/tests/kat_sig.c/combine_message_signature.fragment index 25609f254e..2e6c215056 100644 --- a/scripts/copy_from_upstream/tests/kat_sig.c/combine_message_signature.fragment +++ b/scripts/copy_from_upstream/tests/kat_sig.c/combine_message_signature.fragment @@ -3,7 +3,7 @@ {%- if scheme['signed_msg_order'] == 'sig_then_msg' %} // signed_msg = signature || msg *signed_msg_len = signature_len + msg_len; - *signed_msg = malloc(*signed_msg_len); + *signed_msg = OQS_MEM_malloc(*signed_msg_len); if (*signed_msg == NULL) { return OQS_ERROR; } @@ -13,7 +13,7 @@ {%- elif scheme['signed_msg_order'] == 'msg_then_sig' %} // signed_msg = msg || signature *signed_msg_len = msg_len + signature_len; - *signed_msg = malloc(*signed_msg_len); + *signed_msg = OQS_MEM_malloc(*signed_msg_len); if (*signed_msg == NULL) { return OQS_ERROR; } @@ -24,7 +24,7 @@ // signed_msg = sig_len (2 bytes, big endian) || nonce (40 bytes) || msg || 0x29 || sig const uint16_t signature_len_uint16 = (uint16_t)signature_len; *signed_msg_len = 2 + signature_len_uint16 + msg_len; - *signed_msg = malloc(*signed_msg_len); + *signed_msg = OQS_MEM_malloc(*signed_msg_len); if (*signed_msg == NULL) { return OQS_ERROR; } @@ -44,7 +44,7 @@ // signed_msg = sig_len (2 bytes, big endian) || nonce (40 bytes) || msg || 0x2A || sig const uint16_t signature_len_uint16 = (uint16_t)signature_len; *signed_msg_len = 2 + signature_len + msg_len; - *signed_msg = malloc(*signed_msg_len); + *signed_msg = OQS_MEM_malloc(*signed_msg_len); if (*signed_msg == NULL) { return OQS_ERROR; } diff --git a/src/kem/classic_mceliece/kem_classic_mceliece_348864.c b/src/kem/classic_mceliece/kem_classic_mceliece_348864.c index 87b74a1b98..b935b8c6ff 100644 --- a/src/kem/classic_mceliece/kem_classic_mceliece_348864.c +++ b/src/kem/classic_mceliece/kem_classic_mceliece_348864.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_classic_mceliece_348864_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/classic_mceliece/kem_classic_mceliece_348864f.c b/src/kem/classic_mceliece/kem_classic_mceliece_348864f.c index a3c347af8f..e54ad855cf 100644 --- a/src/kem/classic_mceliece/kem_classic_mceliece_348864f.c +++ b/src/kem/classic_mceliece/kem_classic_mceliece_348864f.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_classic_mceliece_348864f_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/classic_mceliece/kem_classic_mceliece_460896.c b/src/kem/classic_mceliece/kem_classic_mceliece_460896.c index 839f8d4535..458d8a95c7 100644 --- a/src/kem/classic_mceliece/kem_classic_mceliece_460896.c +++ b/src/kem/classic_mceliece/kem_classic_mceliece_460896.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_classic_mceliece_460896_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/classic_mceliece/kem_classic_mceliece_460896f.c b/src/kem/classic_mceliece/kem_classic_mceliece_460896f.c index 0629166487..f1cbc1ee88 100644 --- a/src/kem/classic_mceliece/kem_classic_mceliece_460896f.c +++ b/src/kem/classic_mceliece/kem_classic_mceliece_460896f.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_classic_mceliece_460896f_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/classic_mceliece/kem_classic_mceliece_6688128.c b/src/kem/classic_mceliece/kem_classic_mceliece_6688128.c index 91a70105dc..9b302f1975 100644 --- a/src/kem/classic_mceliece/kem_classic_mceliece_6688128.c +++ b/src/kem/classic_mceliece/kem_classic_mceliece_6688128.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_classic_mceliece_6688128_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/classic_mceliece/kem_classic_mceliece_6688128f.c b/src/kem/classic_mceliece/kem_classic_mceliece_6688128f.c index d97e5c3501..2ccf2e2f79 100644 --- a/src/kem/classic_mceliece/kem_classic_mceliece_6688128f.c +++ b/src/kem/classic_mceliece/kem_classic_mceliece_6688128f.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_classic_mceliece_6688128f_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/classic_mceliece/kem_classic_mceliece_6960119.c b/src/kem/classic_mceliece/kem_classic_mceliece_6960119.c index 70d828fcdd..31ebbe0532 100644 --- a/src/kem/classic_mceliece/kem_classic_mceliece_6960119.c +++ b/src/kem/classic_mceliece/kem_classic_mceliece_6960119.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_classic_mceliece_6960119_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/classic_mceliece/kem_classic_mceliece_6960119f.c b/src/kem/classic_mceliece/kem_classic_mceliece_6960119f.c index 5c4bfa71a7..45f2e624e4 100644 --- a/src/kem/classic_mceliece/kem_classic_mceliece_6960119f.c +++ b/src/kem/classic_mceliece/kem_classic_mceliece_6960119f.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_classic_mceliece_6960119f_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/classic_mceliece/kem_classic_mceliece_8192128.c b/src/kem/classic_mceliece/kem_classic_mceliece_8192128.c index 4dc8fe263b..df39ea18d6 100644 --- a/src/kem/classic_mceliece/kem_classic_mceliece_8192128.c +++ b/src/kem/classic_mceliece/kem_classic_mceliece_8192128.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_classic_mceliece_8192128_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/classic_mceliece/kem_classic_mceliece_8192128f.c b/src/kem/classic_mceliece/kem_classic_mceliece_8192128f.c index 81981c1fad..c1253440ce 100644 --- a/src/kem/classic_mceliece/kem_classic_mceliece_8192128f.c +++ b/src/kem/classic_mceliece/kem_classic_mceliece_8192128f.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_classic_mceliece_8192128f_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/hqc/kem_hqc_128.c b/src/kem/hqc/kem_hqc_128.c index edabb8c2f2..300ff93e02 100644 --- a/src/kem/hqc/kem_hqc_128.c +++ b/src/kem/hqc/kem_hqc_128.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_hqc_128_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/hqc/kem_hqc_192.c b/src/kem/hqc/kem_hqc_192.c index 3da83c5e9e..e0e6d676aa 100644 --- a/src/kem/hqc/kem_hqc_192.c +++ b/src/kem/hqc/kem_hqc_192.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_hqc_192_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/hqc/kem_hqc_256.c b/src/kem/hqc/kem_hqc_256.c index a80197c228..6cd66b634b 100644 --- a/src/kem/hqc/kem_hqc_256.c +++ b/src/kem/hqc/kem_hqc_256.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_hqc_256_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/kyber/kem_kyber_1024.c b/src/kem/kyber/kem_kyber_1024.c index db72b23cd5..44c8879b1a 100644 --- a/src/kem/kyber/kem_kyber_1024.c +++ b/src/kem/kyber/kem_kyber_1024.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_kyber_1024_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/kyber/kem_kyber_512.c b/src/kem/kyber/kem_kyber_512.c index e2b870713d..db6618fe45 100644 --- a/src/kem/kyber/kem_kyber_512.c +++ b/src/kem/kyber/kem_kyber_512.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_kyber_512_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/kyber/kem_kyber_768.c b/src/kem/kyber/kem_kyber_768.c index d1b792b5ce..263f8a081d 100644 --- a/src/kem/kyber/kem_kyber_768.c +++ b/src/kem/kyber/kem_kyber_768.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_kyber_768_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/ml_kem/kem_ml_kem_1024.c b/src/kem/ml_kem/kem_ml_kem_1024.c index 51297a61f0..8fc125999e 100644 --- a/src/kem/ml_kem/kem_ml_kem_1024.c +++ b/src/kem/ml_kem/kem_ml_kem_1024.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_ml_kem_1024_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/ml_kem/kem_ml_kem_512.c b/src/kem/ml_kem/kem_ml_kem_512.c index ec1e147c5c..fffc647dcb 100644 --- a/src/kem/ml_kem/kem_ml_kem_512.c +++ b/src/kem/ml_kem/kem_ml_kem_512.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_ml_kem_512_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/kem/ml_kem/kem_ml_kem_768.c b/src/kem/ml_kem/kem_ml_kem_768.c index 789e3ffd76..a8d0e8a3ff 100644 --- a/src/kem/ml_kem/kem_ml_kem_768.c +++ b/src/kem/ml_kem/kem_ml_kem_768.c @@ -8,7 +8,7 @@ OQS_KEM *OQS_KEM_ml_kem_768_new(void) { - OQS_KEM *kem = malloc(sizeof(OQS_KEM)); + OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM)); if (kem == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdp_128_balanced.c b/src/sig/cross/sig_cross_rsdp_128_balanced.c index 0460004239..0bf311bf51 100644 --- a/src/sig/cross/sig_cross_rsdp_128_balanced.c +++ b/src/sig/cross/sig_cross_rsdp_128_balanced.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdp_128_balanced_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdp_128_fast.c b/src/sig/cross/sig_cross_rsdp_128_fast.c index 5ad9f0ae31..f981c6feda 100644 --- a/src/sig/cross/sig_cross_rsdp_128_fast.c +++ b/src/sig/cross/sig_cross_rsdp_128_fast.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdp_128_fast_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdp_128_small.c b/src/sig/cross/sig_cross_rsdp_128_small.c index 24fb6f6cb7..6cd10ea3a9 100644 --- a/src/sig/cross/sig_cross_rsdp_128_small.c +++ b/src/sig/cross/sig_cross_rsdp_128_small.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdp_128_small_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdp_192_balanced.c b/src/sig/cross/sig_cross_rsdp_192_balanced.c index f4cc950cb9..c698b268a5 100644 --- a/src/sig/cross/sig_cross_rsdp_192_balanced.c +++ b/src/sig/cross/sig_cross_rsdp_192_balanced.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdp_192_balanced_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdp_192_fast.c b/src/sig/cross/sig_cross_rsdp_192_fast.c index 8bed778f65..64556713fa 100644 --- a/src/sig/cross/sig_cross_rsdp_192_fast.c +++ b/src/sig/cross/sig_cross_rsdp_192_fast.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdp_192_fast_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdp_192_small.c b/src/sig/cross/sig_cross_rsdp_192_small.c index 53864a8661..df57669b54 100644 --- a/src/sig/cross/sig_cross_rsdp_192_small.c +++ b/src/sig/cross/sig_cross_rsdp_192_small.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdp_192_small_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdp_256_balanced.c b/src/sig/cross/sig_cross_rsdp_256_balanced.c index 3cd07a60bb..da1e03494a 100644 --- a/src/sig/cross/sig_cross_rsdp_256_balanced.c +++ b/src/sig/cross/sig_cross_rsdp_256_balanced.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdp_256_balanced_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdp_256_fast.c b/src/sig/cross/sig_cross_rsdp_256_fast.c index 3c954f9a28..e11218a3d8 100644 --- a/src/sig/cross/sig_cross_rsdp_256_fast.c +++ b/src/sig/cross/sig_cross_rsdp_256_fast.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdp_256_fast_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdp_256_small.c b/src/sig/cross/sig_cross_rsdp_256_small.c index f20039a911..8c2a2512df 100644 --- a/src/sig/cross/sig_cross_rsdp_256_small.c +++ b/src/sig/cross/sig_cross_rsdp_256_small.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdp_256_small_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdpg_128_balanced.c b/src/sig/cross/sig_cross_rsdpg_128_balanced.c index 2877847715..5e6ecd898c 100644 --- a/src/sig/cross/sig_cross_rsdpg_128_balanced.c +++ b/src/sig/cross/sig_cross_rsdpg_128_balanced.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdpg_128_balanced_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdpg_128_fast.c b/src/sig/cross/sig_cross_rsdpg_128_fast.c index cf10d6298d..cfc4393e5a 100644 --- a/src/sig/cross/sig_cross_rsdpg_128_fast.c +++ b/src/sig/cross/sig_cross_rsdpg_128_fast.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdpg_128_fast_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdpg_128_small.c b/src/sig/cross/sig_cross_rsdpg_128_small.c index e2cab5d433..455b82238c 100644 --- a/src/sig/cross/sig_cross_rsdpg_128_small.c +++ b/src/sig/cross/sig_cross_rsdpg_128_small.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdpg_128_small_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdpg_192_balanced.c b/src/sig/cross/sig_cross_rsdpg_192_balanced.c index e85be184be..ead0d35b43 100644 --- a/src/sig/cross/sig_cross_rsdpg_192_balanced.c +++ b/src/sig/cross/sig_cross_rsdpg_192_balanced.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdpg_192_balanced_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdpg_192_fast.c b/src/sig/cross/sig_cross_rsdpg_192_fast.c index 4c600ae14f..1b421b767b 100644 --- a/src/sig/cross/sig_cross_rsdpg_192_fast.c +++ b/src/sig/cross/sig_cross_rsdpg_192_fast.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdpg_192_fast_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdpg_192_small.c b/src/sig/cross/sig_cross_rsdpg_192_small.c index 624f02e458..8b3c091c11 100644 --- a/src/sig/cross/sig_cross_rsdpg_192_small.c +++ b/src/sig/cross/sig_cross_rsdpg_192_small.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdpg_192_small_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdpg_256_balanced.c b/src/sig/cross/sig_cross_rsdpg_256_balanced.c index 73f12fafbf..0e7ce61e84 100644 --- a/src/sig/cross/sig_cross_rsdpg_256_balanced.c +++ b/src/sig/cross/sig_cross_rsdpg_256_balanced.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdpg_256_balanced_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdpg_256_fast.c b/src/sig/cross/sig_cross_rsdpg_256_fast.c index 1ebfa2c224..83105f1c8d 100644 --- a/src/sig/cross/sig_cross_rsdpg_256_fast.c +++ b/src/sig/cross/sig_cross_rsdpg_256_fast.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdpg_256_fast_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/cross/sig_cross_rsdpg_256_small.c b/src/sig/cross/sig_cross_rsdpg_256_small.c index 6f105167e2..72d8546aab 100644 --- a/src/sig/cross/sig_cross_rsdpg_256_small.c +++ b/src/sig/cross/sig_cross_rsdpg_256_small.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_cross_rsdpg_256_small_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/dilithium/sig_dilithium_2.c b/src/sig/dilithium/sig_dilithium_2.c index de1b2ad1fa..89372111b3 100644 --- a/src/sig/dilithium/sig_dilithium_2.c +++ b/src/sig/dilithium/sig_dilithium_2.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_dilithium_2_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/dilithium/sig_dilithium_3.c b/src/sig/dilithium/sig_dilithium_3.c index f1a8311a20..20cef1bf5d 100644 --- a/src/sig/dilithium/sig_dilithium_3.c +++ b/src/sig/dilithium/sig_dilithium_3.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_dilithium_3_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/dilithium/sig_dilithium_5.c b/src/sig/dilithium/sig_dilithium_5.c index 06871be6e6..2e7a985682 100644 --- a/src/sig/dilithium/sig_dilithium_5.c +++ b/src/sig/dilithium/sig_dilithium_5.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_dilithium_5_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/falcon/sig_falcon_1024.c b/src/sig/falcon/sig_falcon_1024.c index 06562cdea7..b306f0c4b8 100644 --- a/src/sig/falcon/sig_falcon_1024.c +++ b/src/sig/falcon/sig_falcon_1024.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_falcon_1024_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/falcon/sig_falcon_512.c b/src/sig/falcon/sig_falcon_512.c index d77e3eb735..d66f51d266 100644 --- a/src/sig/falcon/sig_falcon_512.c +++ b/src/sig/falcon/sig_falcon_512.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_falcon_512_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/falcon/sig_falcon_padded_1024.c b/src/sig/falcon/sig_falcon_padded_1024.c index 53b8c3926d..0389fc97e6 100644 --- a/src/sig/falcon/sig_falcon_padded_1024.c +++ b/src/sig/falcon/sig_falcon_padded_1024.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_falcon_padded_1024_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/falcon/sig_falcon_padded_512.c b/src/sig/falcon/sig_falcon_padded_512.c index 9521187b80..781e7bf75a 100644 --- a/src/sig/falcon/sig_falcon_padded_512.c +++ b/src/sig/falcon/sig_falcon_padded_512.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_falcon_padded_512_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/mayo/sig_mayo_1.c b/src/sig/mayo/sig_mayo_1.c index 93034eb5ef..9d78196278 100644 --- a/src/sig/mayo/sig_mayo_1.c +++ b/src/sig/mayo/sig_mayo_1.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_mayo_1_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/mayo/sig_mayo_2.c b/src/sig/mayo/sig_mayo_2.c index 25719f0aee..1dbdadddad 100644 --- a/src/sig/mayo/sig_mayo_2.c +++ b/src/sig/mayo/sig_mayo_2.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_mayo_2_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/mayo/sig_mayo_3.c b/src/sig/mayo/sig_mayo_3.c index 7a68024880..ba8ee36dc6 100644 --- a/src/sig/mayo/sig_mayo_3.c +++ b/src/sig/mayo/sig_mayo_3.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_mayo_3_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/mayo/sig_mayo_5.c b/src/sig/mayo/sig_mayo_5.c index ca19cfbf91..633328dcbb 100644 --- a/src/sig/mayo/sig_mayo_5.c +++ b/src/sig/mayo/sig_mayo_5.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_mayo_5_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/ml_dsa/sig_ml_dsa_44_ipd.c b/src/sig/ml_dsa/sig_ml_dsa_44_ipd.c index 6d3f1e2cc2..5856a4c531 100644 --- a/src/sig/ml_dsa/sig_ml_dsa_44_ipd.c +++ b/src/sig/ml_dsa/sig_ml_dsa_44_ipd.c @@ -10,7 +10,7 @@ OQS_SIG *OQS_SIG_ml_dsa_44_ipd_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } @@ -36,7 +36,7 @@ OQS_SIG *OQS_SIG_ml_dsa_44_ipd_new(void) { /** Alias */ OQS_SIG *OQS_SIG_ml_dsa_44_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/ml_dsa/sig_ml_dsa_65_ipd.c b/src/sig/ml_dsa/sig_ml_dsa_65_ipd.c index 4c175d680c..4fc828966f 100644 --- a/src/sig/ml_dsa/sig_ml_dsa_65_ipd.c +++ b/src/sig/ml_dsa/sig_ml_dsa_65_ipd.c @@ -10,7 +10,7 @@ OQS_SIG *OQS_SIG_ml_dsa_65_ipd_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } @@ -36,7 +36,7 @@ OQS_SIG *OQS_SIG_ml_dsa_65_ipd_new(void) { /** Alias */ OQS_SIG *OQS_SIG_ml_dsa_65_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/ml_dsa/sig_ml_dsa_87_ipd.c b/src/sig/ml_dsa/sig_ml_dsa_87_ipd.c index 2ba18d57c5..5b362a2c08 100644 --- a/src/sig/ml_dsa/sig_ml_dsa_87_ipd.c +++ b/src/sig/ml_dsa/sig_ml_dsa_87_ipd.c @@ -10,7 +10,7 @@ OQS_SIG *OQS_SIG_ml_dsa_87_ipd_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } @@ -36,7 +36,7 @@ OQS_SIG *OQS_SIG_ml_dsa_87_ipd_new(void) { /** Alias */ OQS_SIG *OQS_SIG_ml_dsa_87_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_sha2_128f_simple.c b/src/sig/sphincs/sig_sphincs_sha2_128f_simple.c index d3872e9c3c..1b92d96a8a 100644 --- a/src/sig/sphincs/sig_sphincs_sha2_128f_simple.c +++ b/src/sig/sphincs/sig_sphincs_sha2_128f_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_sha2_128f_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_sha2_128s_simple.c b/src/sig/sphincs/sig_sphincs_sha2_128s_simple.c index d9dab73c1e..fabd013849 100644 --- a/src/sig/sphincs/sig_sphincs_sha2_128s_simple.c +++ b/src/sig/sphincs/sig_sphincs_sha2_128s_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_sha2_128s_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_sha2_192f_simple.c b/src/sig/sphincs/sig_sphincs_sha2_192f_simple.c index b7e2cf4372..74e280f963 100644 --- a/src/sig/sphincs/sig_sphincs_sha2_192f_simple.c +++ b/src/sig/sphincs/sig_sphincs_sha2_192f_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_sha2_192f_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_sha2_192s_simple.c b/src/sig/sphincs/sig_sphincs_sha2_192s_simple.c index 5104a7e5be..6368233999 100644 --- a/src/sig/sphincs/sig_sphincs_sha2_192s_simple.c +++ b/src/sig/sphincs/sig_sphincs_sha2_192s_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_sha2_192s_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_sha2_256f_simple.c b/src/sig/sphincs/sig_sphincs_sha2_256f_simple.c index 3e372e359d..57f569a2ad 100644 --- a/src/sig/sphincs/sig_sphincs_sha2_256f_simple.c +++ b/src/sig/sphincs/sig_sphincs_sha2_256f_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_sha2_256f_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_sha2_256s_simple.c b/src/sig/sphincs/sig_sphincs_sha2_256s_simple.c index c2e468ccde..6088aada72 100644 --- a/src/sig/sphincs/sig_sphincs_sha2_256s_simple.c +++ b/src/sig/sphincs/sig_sphincs_sha2_256s_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_sha2_256s_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_shake_128f_simple.c b/src/sig/sphincs/sig_sphincs_shake_128f_simple.c index f3539ddb74..11fb1091b5 100644 --- a/src/sig/sphincs/sig_sphincs_shake_128f_simple.c +++ b/src/sig/sphincs/sig_sphincs_shake_128f_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_shake_128f_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_shake_128s_simple.c b/src/sig/sphincs/sig_sphincs_shake_128s_simple.c index c46327547a..8578bd4d30 100644 --- a/src/sig/sphincs/sig_sphincs_shake_128s_simple.c +++ b/src/sig/sphincs/sig_sphincs_shake_128s_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_shake_128s_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_shake_192f_simple.c b/src/sig/sphincs/sig_sphincs_shake_192f_simple.c index 9d48934cfb..8e1b152977 100644 --- a/src/sig/sphincs/sig_sphincs_shake_192f_simple.c +++ b/src/sig/sphincs/sig_sphincs_shake_192f_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_shake_192f_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_shake_192s_simple.c b/src/sig/sphincs/sig_sphincs_shake_192s_simple.c index add522d162..6ccb2bd5f9 100644 --- a/src/sig/sphincs/sig_sphincs_shake_192s_simple.c +++ b/src/sig/sphincs/sig_sphincs_shake_192s_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_shake_192s_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_shake_256f_simple.c b/src/sig/sphincs/sig_sphincs_shake_256f_simple.c index 73143d77d0..29671454bc 100644 --- a/src/sig/sphincs/sig_sphincs_shake_256f_simple.c +++ b/src/sig/sphincs/sig_sphincs_shake_256f_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_shake_256f_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; } diff --git a/src/sig/sphincs/sig_sphincs_shake_256s_simple.c b/src/sig/sphincs/sig_sphincs_shake_256s_simple.c index 832292dc3d..0cbd5476bc 100644 --- a/src/sig/sphincs/sig_sphincs_shake_256s_simple.c +++ b/src/sig/sphincs/sig_sphincs_shake_256s_simple.c @@ -8,7 +8,7 @@ OQS_SIG *OQS_SIG_sphincs_shake_256s_simple_new(void) { - OQS_SIG *sig = malloc(sizeof(OQS_SIG)); + OQS_SIG *sig = OQS_MEM_malloc(sizeof(OQS_SIG)); if (sig == NULL) { return NULL; }