Always request zeroed memory, in case we're dumb enough to leak it later.

Approved by:	re (gjb)
This commit is contained in:
Dag-Erling Smørgrav 2013-09-22 23:47:56 +00:00
parent 462fc0e072
commit 0f7bc112c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255805

View File

@ -52,11 +52,11 @@ __FBSDID("$FreeBSD$");
#ifdef _KERNEL
static MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers");
#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK)
#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK|M_ZERO)
#define SBFREE(buf) free(buf, M_SBUF)
#else /* _KERNEL */
#define KASSERT(e, m)
#define SBMALLOC(size) malloc(size)
#define SBMALLOC(size) calloc(1, size)
#define SBFREE(buf) free(buf)
#endif /* _KERNEL */