diff options
author | John Baldwin <jhb@FreeBSD.org> | 2021-11-10 16:14:33 -0800 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-06-10 18:57:22 +0200 |
commit | 7196782c5d74f876e6eb3e72c0b6346a70d736e4 (patch) | |
tree | 4f4f8be6d5e875ae906db69cb5b1148a693efab2 /src/wg_noise.c | |
parent | if_wg: wgc_get/set: use M_WAITOK with malloc() (diff) | |
download | wireguard-freebsd-7196782c5d74f876e6eb3e72c0b6346a70d736e4.tar.xz wireguard-freebsd-7196782c5d74f876e6eb3e72c0b6346a70d736e4.zip |
if_wg: wg_clone_create: Use M_WAITOK with malloc
Signed-off-by: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'src/wg_noise.c')
-rw-r--r-- | src/wg_noise.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wg_noise.c b/src/wg_noise.c index f8d823c..6848627 100644 --- a/src/wg_noise.c +++ b/src/wg_noise.c @@ -181,9 +181,7 @@ noise_local_alloc(void *arg) struct noise_local *l; size_t i; - l = malloc(sizeof(*l), M_NOISE, M_NOWAIT | M_ZERO); - if (!l) - return (NULL); + l = malloc(sizeof(*l), M_NOISE, M_WAITOK | M_ZERO); rw_init(&l->l_identity_lock, "noise_identity"); l->l_has_identity = false; |