From e20edd3eab5fd8dff0ea04f94eab8293391673e0 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 10 Sep 2019 13:46:26 +0200 Subject: Fix typo in the previous commits NULL check --- lease.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lease.c b/lease.c index 7551083..8a48a27 100644 --- a/lease.c +++ b/lease.c @@ -161,7 +161,7 @@ struct wg_dynamic_lease *new_lease(wg_key pubkey, uint32_t leasetime, lease->next = NULL; wg_key *pubcopy = malloc(sizeof(wg_key)); - if (!pubkey) + if (!pubcopy) fatal("malloc()"); memcpy(pubcopy, pubkey, sizeof(wg_key)); -- cgit v1.2.3-59-g8ed1b