The zalloc and calloc functions do not actually zero the memory. Added memset to rte_zmalloc_socket() so allocated memory is cleared.
Signed-off-by: David Harton <[email protected]> --- v2 Indented if clause lib/librte_eal/common/rte_malloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/rte_malloc.c b/lib/librte_eal/common/rte_malloc.c index 0da5ad5e8..40a5384ff 100644 --- a/lib/librte_eal/common/rte_malloc.c +++ b/lib/librte_eal/common/rte_malloc.c @@ -74,7 +74,10 @@ rte_malloc(const char *type, size_t size, unsigned align) void * rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket) { - return rte_malloc_socket(type, size, align, socket); + void *new_ptr = rte_malloc_socket(type, size, align, socket); + if (new_ptr) + memset(new_ptr, 0, size); + return new_ptr; } /* -- 2.19.1

