fixed : potential malloc error
This commit is contained in:
parent
f86c0e7d10
commit
7b2c31043c
@ -331,6 +331,7 @@ struct ZBUFF_DCtx_s {
|
||||
ZBUFF_DCtx* ZBUFF_createDCtx(void)
|
||||
{
|
||||
ZBUFF_DCtx* zbc = (ZBUFF_DCtx*)malloc(sizeof(ZBUFF_DCtx));
|
||||
if (zbc==NULL) return NULL;
|
||||
memset(zbc, 0, sizeof(*zbc));
|
||||
zbc->zc = ZSTD_createDCtx();
|
||||
zbc->stage = ZBUFFds_init;
|
||||
|
Loading…
Reference in New Issue
Block a user