From 546ac7936340312cf272969ff83317ae4d50d2b4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 2 Aug 2014 00:53:47 +0200 Subject: Introduce and use alloc helpers These new helpers will terminate fastd on allocation failures and add some additional convenience (allow strdup with NULL; typesafe new(type) macros). --- src/verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verify.c') diff --git a/src/verify.c b/src/verify.c index 2890725..2031079 100644 --- a/src/verify.c +++ b/src/verify.c @@ -115,7 +115,7 @@ fastd_tristate_t fastd_verify_peer(fastd_peer_t *peer, fastd_socket_t *sock, con return fastd_tristate_false; } - verify_arg_t *arg = calloc(1, sizeof(verify_arg_t) + data_len); + verify_arg_t *arg = fastd_alloc0(sizeof(verify_arg_t) + data_len); arg->env = env; arg->ret_len = sizeof(fastd_async_verify_return_t) + data_len; -- cgit v1.2.3