summaryrefslogtreecommitdiff
path: root/sys/netinet/in.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/in.c')
-rw-r--r--sys/netinet/in.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 8ea29ad341b..0563d04f876 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.c,v 1.171 2021/03/10 10:21:48 jsg Exp $ */
+/* $OpenBSD: in.c,v 1.172 2022/03/04 21:09:03 bluhm Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
@@ -866,10 +866,7 @@ in_addmulti(struct in_addr *ap, struct ifnet *ifp)
* New address; allocate a new multicast record
* and link it into the interface's multicast list.
*/
- inm = malloc(sizeof(*inm), M_IPMADDR, M_NOWAIT | M_ZERO);
- if (inm == NULL)
- return (NULL);
-
+ inm = malloc(sizeof(*inm), M_IPMADDR, M_WAITOK | M_ZERO);
inm->inm_sin.sin_len = sizeof(struct sockaddr_in);
inm->inm_sin.sin_family = AF_INET;
inm->inm_sin.sin_addr = *ap;