summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2020-05-21 11:53:24 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2020-05-21 11:53:24 +0000
commitc74008f5d6b74c1766b87c078e5cb9a2d4e7b14e (patch)
treeb8d572041bad7fd7813157d812b373835e3bb3b9 /usr/src
parent3a3342e9979875c346e254bbe0041bb3af56ec04 (diff)
parentcab7c30c9587a8c7b5dd94af5f688dc5b8e8add7 (diff)
downloadillumos-joyent-c74008f5d6b74c1766b87c078e5cb9a2d4e7b14e.tar.gz
[illumos-gate merge]
commit cab7c30c9587a8c7b5dd94af5f688dc5b8e8add7 12757 lz4 hash table does not start zeroed
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/common/lz4/lz4.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/src/common/lz4/lz4.c b/usr/src/common/lz4/lz4.c
index 337af44e76..24dde133f7 100644
--- a/usr/src/common/lz4/lz4.c
+++ b/usr/src/common/lz4/lz4.c
@@ -33,6 +33,7 @@
*/
/*
* Copyright (c) 2016 by Delphix. All rights reserved.
+ * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
*/
#if defined(_KERNEL) || defined(_FAKE_KERNEL)
@@ -921,7 +922,7 @@ real_LZ4_compress(const char *source, char *dest, int isize, int osize)
#if defined(_KERNEL) || defined(_FAKE_KERNEL)
void *ctx = kmem_zalloc(sizeof (struct refTables), KM_NOSLEEP);
#else
- void *ctx = malloc(sizeof (struct refTables));
+ void *ctx = calloc(1, sizeof (struct refTables));
#endif
int result;