summaryrefslogtreecommitdiffstats
path: root/sys/contrib/ncsw
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2016-04-24 01:38:45 +0000
committerjhibbits <jhibbits@FreeBSD.org>2016-04-24 01:38:45 +0000
commit45c64e5056abe3ab6dbd19ba97a0e9fad87b4dfc (patch)
tree0e325df894125f013c71a94a876d8d17cf123ca6 /sys/contrib/ncsw
parentbb0d234bf32ea8365b04ff4bd25a5ac6fe63bb39 (diff)
downloadFreeBSD-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.c2
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);
OpenPOWER on IntegriCloud