From: Yann Collet Date: Wed, 29 May 2019 00:27:52 +0000 (-0700) Subject: fullbench 43: ensure context is freed after each usage X-Git-Tag: v1.4.1^2~36^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c63081623f76c909e7bd2f1bd523c9a1fe9495f3;p=thirdparty%2Fzstd.git fullbench 43: ensure context is freed after each usage --- diff --git a/tests/fullbench.c b/tests/fullbench.c index 3340e9b53..cd6e74546 100644 --- a/tests/fullbench.c +++ b/tests/fullbench.c @@ -166,11 +166,14 @@ local_ZSTD_compressStream_freshCCtx(const void* src, size_t srcSize, void* buff2) { ZSTD_CCtx* const cctx = ZSTD_createCCtx(); + size_t r; assert(cctx != NULL); - return local_ZSTD_compressStream(src, srcSize, dst, dstCapacity, buff2); + r = local_ZSTD_compressStream(src, srcSize, dst, dstCapacity, buff2); ZSTD_freeCCtx(cctx); + + return r; } static size_t