Zero pointers after freeing
This commit is contained in:
@@ -2970,9 +2970,13 @@ size_t ZSTD_freeCStream(ZSTD_CStream* zcs)
|
||||
if (zcs==NULL) return 0; /* support free on NULL */
|
||||
{ ZSTD_customMem const cMem = zcs->customMem;
|
||||
ZSTD_freeCCtx(zcs->cctx);
|
||||
zcs->cctx = NULL;
|
||||
ZSTD_freeCDict(zcs->cdictLocal);
|
||||
zcs->cdictLocal = NULL;
|
||||
ZSTD_free(zcs->inBuff, cMem);
|
||||
zcs->inBuff = NULL;
|
||||
ZSTD_free(zcs->outBuff, cMem);
|
||||
zcs->outBuff = NULL;
|
||||
ZSTD_free(zcs, cMem);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user