aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2019-09-10 13:46:26 +0200
committerThomas Gschwantner <tharre3@gmail.com>2019-09-27 17:52:54 +0200
commite20edd3eab5fd8dff0ea04f94eab8293391673e0 (patch)
treecaaa34f67553e9a7dc56cf706f4ae9cde8132207
parentFix incorrect use of pubkey ptr in new_lease() (diff)
downloadwg-dynamic-e20edd3eab5fd8dff0ea04f94eab8293391673e0.tar.xz
wg-dynamic-e20edd3eab5fd8dff0ea04f94eab8293391673e0.zip
Fix typo in the previous commits NULL check
-rw-r--r--lease.c2
1 files changed, 1 insertions, 1 deletions
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));