diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2016-04-24 01:38:45 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2016-04-24 01:38:45 +0000 |
commit | 45c64e5056abe3ab6dbd19ba97a0e9fad87b4dfc (patch) | |
tree | 0e325df894125f013c71a94a876d8d17cf123ca6 /sys/contrib/ncsw | |
parent | bb0d234bf32ea8365b04ff4bd25a5ac6fe63bb39 (diff) | |
download | FreeBSD-src-45c64e5056abe3ab6dbd19ba97a0e9fad87b4dfc.zip FreeBSD-src-45c64e5056abe3ab6dbd19ba97a0e9fad87b4dfc.tar.gz |
Zero the newly allocated spinlock.
Not sure how this worked testing with DIAGNOSTIC set, but with it disabled this
fails due to the spinlock being "initialized" with 0xdeadc0de.
Diffstat (limited to 'sys/contrib/ncsw')
-rw-r--r-- | sys/contrib/ncsw/user/env/xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/contrib/ncsw/user/env/xx.c b/sys/contrib/ncsw/user/env/xx.c index 0ca7bc1..264f7db 100644 --- a/sys/contrib/ncsw/user/env/xx.c +++ b/sys/contrib/ncsw/user/env/xx.c @@ -561,7 +561,7 @@ XX_InitSpinlock(void) { struct mtx *m; - m = malloc(sizeof(*m), M_NETCOMMSW, M_NOWAIT); + m = malloc(sizeof(*m), M_NETCOMMSW, M_NOWAIT | M_ZERO); if (!m) return (0); |