diff options
author | 2004-06-10 17:00:06 +0000 | |
---|---|---|
committer | 2004-06-10 17:00:06 +0000 | |
commit | 660ee0660e4247a5e57233524c293638fd9ad59a (patch) | |
tree | ecd5dbb0fce2b593e4377a5ee04e0751da7fe797 | |
parent | Plug a memory leak in carp_clone_destroy() (diff) | |
download | wireguard-openbsd-660ee0660e4247a5e57233524c293638fd9ad59a.tar.xz wireguard-openbsd-660ee0660e4247a5e57233524c293638fd9ad59a.zip |
zero the cif struct correctly.
-rw-r--r-- | sys/netinet/ip_carp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 08b486f7622..730b688076c 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.59 2004/06/10 16:55:37 mcbride Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.60 2004/06/10 17:00:06 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -1321,7 +1321,7 @@ carp_set_addr(struct carp_softc *sc, struct sockaddr_in *sin) goto cleanup; } - bzero(cif, sizeof(cif)); + bzero(cif, sizeof(*cif)); cif->vhif_ifp = ifp; TAILQ_INIT(&cif->vhif_vrs); ifp->if_carp = (caddr_t)cif; @@ -1492,7 +1492,7 @@ carp_set_addr6(struct carp_softc *sc, struct sockaddr_in6 *sin6) goto cleanup; } - bzero(cif, sizeof(cif)); + bzero(cif, sizeof(*cif)); cif->vhif_ifp = ifp; TAILQ_INIT(&cif->vhif_vrs); ifp->if_carp = (caddr_t)cif; |