malloc: avoid possibly returning stack garbage if MALLOC_DEBUG is defined
This commit is contained in:
parent
96915338d5
commit
366f674ab5
@ -559,6 +559,7 @@ malloc(size_t size, struct malloc_type *mtp, int flags)
|
||||
#endif
|
||||
|
||||
#ifdef MALLOC_DEBUG
|
||||
va = NULL;
|
||||
if (malloc_dbg(&va, &size, mtp, flags) != 0)
|
||||
return (va);
|
||||
#endif
|
||||
@ -604,6 +605,7 @@ malloc_domain(size_t size, struct malloc_type *mtp, int domain,
|
||||
#endif
|
||||
|
||||
#ifdef MALLOC_DEBUG
|
||||
va = NULL;
|
||||
if (malloc_dbg(&va, &size, mtp, flags) != 0)
|
||||
return (va);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user