diff options
author | 2021-03-19 13:08:42 -0600 | |
---|---|---|
committer | 2021-03-19 13:08:42 -0600 | |
commit | e8d9d54999bddb689059f3aa918a94f10b224b55 (patch) | |
tree | f860b071c05265e7908c03eb9085c8e0f7db70a9 | |
parent | version: bump (diff) | |
download | wireguard-freebsd-e8d9d54999bddb689059f3aa918a94f10b224b55.tar.xz wireguard-freebsd-e8d9d54999bddb689059f3aa918a94f10b224b55.zip |
if_wg: do not check for null M_NOWAIT return
Reported-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/if_wg.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/if_wg.c b/src/if_wg.c index f14c540..d589842 100644 --- a/src/if_wg.c +++ b/src/if_wg.c @@ -2906,15 +2906,7 @@ wg_marshal_peers(struct wg_softc *sc, nvlist_t **nvlp, nvlist_t ***nvl_arrayp, i err = i = 0; nvl_array = mallocarray(peer_count, sizeof(void *), M_TEMP, M_WAITOK | M_ZERO); - if (!nvl_array) { - err = ENOMEM; - goto out; - } wpe = mallocarray(peer_count, sizeof(*wpe), M_TEMP, M_WAITOK | M_ZERO); - if (!wpe) { - err = ENOMEM; - goto out; - } NET_EPOCH_ENTER(et); CK_LIST_FOREACH(peer, &sc->sc_hashtable.h_peers_list, p_entry) { |