X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/c18c124eaa464aaaa5549e99e5a70fc9cbb50944..3e170ce000f1506b7b5d2c5c7faec85ceabb573d:/bsd/net/if_gif.c diff --git a/bsd/net/if_gif.c b/bsd/net/if_gif.c index c33ef2f04..f144822ba 100644 --- a/bsd/net/if_gif.c +++ b/bsd/net/if_gif.c @@ -330,14 +330,13 @@ gif_clone_create(struct if_clone *ifc, uint32_t unit, __unused void *params) goto done; } - sc = _MALLOC(sizeof (struct gif_softc), M_DEVBUF, M_WAITOK); + sc = _MALLOC(sizeof (struct gif_softc), M_DEVBUF, M_WAITOK | M_ZERO); if (sc == NULL) { log(LOG_ERR, "gif_clone_create: failed to allocate gif%d\n", unit); error = ENOBUFS; goto done; } - bzero(sc, sizeof (struct gif_softc)); /* use the interface name as the unique id for ifp recycle */ snprintf(sc->gif_ifname, sizeof (sc->gif_ifname), "%s%d",