summaryrefslogtreecommitdiffstats
path: root/src/methods/composed_gmac/composed_gmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/methods/composed_gmac/composed_gmac.c')
-rw-r--r--src/methods/composed_gmac/composed_gmac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/methods/composed_gmac/composed_gmac.c b/src/methods/composed_gmac/composed_gmac.c
index 6636e49..ead3cb0 100644
--- a/src/methods/composed_gmac/composed_gmac.c
+++ b/src/methods/composed_gmac/composed_gmac.c
@@ -115,7 +115,7 @@ static bool method_create_by_name(const char *name, fastd_method_t **method) {
if (m.gmac_cipher_info->iv_length <= COMMON_NONCEBYTES)
return false;
- *method = malloc(sizeof(fastd_method_t));
+ *method = fastd_new(fastd_method_t);
**method = m;
return true;
@@ -133,7 +133,7 @@ static size_t method_key_length(const fastd_method_t *method) {
/** Initializes a session */
static fastd_method_session_state_t* method_session_init(const fastd_method_t *method, const uint8_t *secret, bool initiator) {
- fastd_method_session_state_t *session = malloc(sizeof(fastd_method_session_state_t));
+ fastd_method_session_state_t *session = fastd_new(fastd_method_session_state_t);
fastd_method_common_init(&session->common, initiator);
session->method = method;