diff options
author | 2017-04-11 14:43:49 +0000 | |
---|---|---|
committer | 2017-04-11 14:43:49 +0000 | |
commit | 265a1ec57e702d97bc8bccd7cabf77bdfdd08787 (patch) | |
tree | edaf239210013f269929be44bd48c7d9d6f2c730 /sys/net/if_vxlan.c | |
parent | Shuffle route/interface changing functions together into kroute.c. Try to (diff) | |
download | wireguard-openbsd-265a1ec57e702d97bc8bccd7cabf77bdfdd08787.tar.xz wireguard-openbsd-265a1ec57e702d97bc8bccd7cabf77bdfdd08787.zip |
Partially revert previous mallocarray conversions that contain
constants.
The consensus is that if both operands are constant, we don't need
mallocarray. Reminded by tedu@
ok deraadt@
Diffstat (limited to 'sys/net/if_vxlan.c')
-rw-r--r-- | sys/net/if_vxlan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index a159df99d59..1f6928cd292 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vxlan.c,v 1.58 2017/04/09 17:57:58 dhill Exp $ */ +/* $OpenBSD: if_vxlan.c,v 1.59 2017/04/11 14:43:49 dhill Exp $ */ /* * Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org> @@ -129,8 +129,8 @@ vxlan_clone_create(struct if_clone *ifc, int unit) M_DEVBUF, M_NOWAIT|M_ZERO)) == NULL) return (ENOMEM); - sc->sc_imo.imo_membership = mallocarray( - IP_MIN_MEMBERSHIPS, sizeof(struct in_multi *), M_IPMOPTS, + sc->sc_imo.imo_membership = malloc( + (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_IPMOPTS, M_WAITOK|M_ZERO); sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS; sc->sc_dstport = htons(VXLAN_PORT); |