From 22ed31c23f92a8fc2063e016e6b5ffd1087a08aa Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 19 May 2020 19:53:12 +0000 Subject: [PATCH] lz4 hash table does not start zeroed illumos issue: https://www.illumos.org/issues/12757 Submitted by: andyf --- sys/cddl/contrib/opensolaris/common/lz4/lz4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cddl/contrib/opensolaris/common/lz4/lz4.c b/sys/cddl/contrib/opensolaris/common/lz4/lz4.c index ee7f1fbe99e..c21d51350c2 100644 --- a/sys/cddl/contrib/opensolaris/common/lz4/lz4.c +++ b/sys/cddl/contrib/opensolaris/common/lz4/lz4.c @@ -850,7 +850,7 @@ real_LZ4_compress(const char *source, char *dest, int isize, int osize) #if defined(_KERNEL) || defined(_FAKE_KERNEL) void *ctx = kmem_cache_alloc(lz4_ctx_cache, KM_NOSLEEP); #else - void *ctx = malloc(sizeof(struct refTables)); + void *ctx = calloc(1, sizeof(struct refTables)); #endif int result;