aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/ncsw
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2016-04-24 01:38:45 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2016-04-24 01:38:45 +0000
commita4c2c79097830b0afd3d94ce4759576c9b85cf50 (patch)
tree0e325df894125f013c71a94a876d8d17cf123ca6 /sys/contrib/ncsw
parent9b8a603ef07e98a7e37edc9495217cc21a647e70 (diff)
downloadsrc-a4c2c79097830b0afd3d94ce4759576c9b85cf50.tar.gz
src-a4c2c79097830b0afd3d94ce4759576c9b85cf50.zip
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.
Notes
Notes: svn path=/head/; revision=298526
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 0ca7bc101eac..264f7dba5d62 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);