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:
Justin Hibbits 2016-04-24 01:38:45 +00:00
parent 9b8a603ef0
commit a4c2c79097

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