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.
This commit is contained in:
jhibbits 2016-04-24 01:38:45 +00:00
parent bb0d234bf3
commit 45c64e5056

View File

@ -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);