aboutsummaryrefslogtreecommitdiff
path: root/lib/common/comp_lzo.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/comp_lzo.c')
-rw-r--r--lib/common/comp_lzo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/common/comp_lzo.c b/lib/common/comp_lzo.c
index 473b76f..cf5a362 100644
--- a/lib/common/comp_lzo.c
+++ b/lib/common/comp_lzo.c
@@ -176,7 +176,7 @@ static sqfs_compressor_t *lzo_create_copy(sqfs_compressor_t *cmp)
lzo_compressor_t *other = (lzo_compressor_t *)cmp;
lzo_compressor_t *lzo;
- lzo = alloc_flex(sizeof(*lzo), 1, lzo_algs[other->algorithm].bufsize);
+ lzo = calloc(1, sizeof(*lzo) + lzo_algs[other->algorithm].bufsize);
if (lzo == NULL)
return NULL;
@@ -209,8 +209,8 @@ sqfs_compressor_t *lzo_compressor_create(const sqfs_compressor_config_t *cfg)
return NULL;
}
- lzo = alloc_flex(sizeof(*lzo), 1,
- lzo_algs[cfg->opt.lzo.algorithm].bufsize);
+ lzo = calloc(1,
+ sizeof(*lzo) + lzo_algs[cfg->opt.lzo.algorithm].bufsize);
base = (sqfs_compressor_t *)lzo;
if (lzo == NULL)