summaryrefslogtreecommitdiff
path: root/usr/src/common/lz4
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2020-05-26 13:57:13 +0000
committerJohn Levon <john.levon@joyent.com>2020-05-26 13:57:13 +0000
commit5b2acc0949194447bba6e45a0fa44d0b5f42f208 (patch)
tree7ea9eb87bc68fee386dd39035ce715e87a0e673c /usr/src/common/lz4
parent8ca018083101bf1cb175869679bc123187fb1bab (diff)
parent2a1277d3064386cd5c4e372301007aa330bf1d5e (diff)
downloadillumos-joyent-gcc9.tar.gz
mergegcc9
Diffstat (limited to 'usr/src/common/lz4')
-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;