diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-08-02 00:53:47 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-08-02 00:53:47 +0200 |
commit | 546ac7936340312cf272969ff83317ae4d50d2b4 (patch) | |
tree | 7ecadca11430c8624d9f80aae7c348fa4d65b969 /src/protocols/ec25519_fhmqvc/handshake.c | |
parent | b22364f4af3564f0dd9a5f4e150bb09747bd5c4e (diff) | |
download | fastd-546ac7936340312cf272969ff83317ae4d50d2b4.tar fastd-546ac7936340312cf272969ff83317ae4d50d2b4.zip |
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).
Diffstat (limited to 'src/protocols/ec25519_fhmqvc/handshake.c')
-rw-r--r-- | src/protocols/ec25519_fhmqvc/handshake.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c index 99f1829..9a1c8de 100644 --- a/src/protocols/ec25519_fhmqvc/handshake.c +++ b/src/protocols/ec25519_fhmqvc/handshake.c @@ -580,7 +580,7 @@ static fastd_peer_t * add_temporary(fastd_socket_t *sock, const fastd_peer_addre fastd_peer_t *peer = fastd_peer_add(NULL); - peer->protocol_config = malloc(sizeof(fastd_protocol_peer_config_t)); + peer->protocol_config = fastd_new(fastd_protocol_peer_config_t); memcpy(&peer->protocol_config->public_key, key, PUBLICKEYBYTES); /* Ugly hack */ |