| 13229 | } |
| 13230 | |
| 13231 | size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx) |
| 13232 | { |
| 13233 | if (cctx==NULL) return 0; /* support free on NULL */ |
| 13234 | RETURN_ERROR_IF(cctx->staticSize, memory_allocation, |
| 13235 | "not compatible with static CCtx"); |
| 13236 | { |
| 13237 | int cctxInWorkspace = ZSTD_cwksp_owns_buffer(&cctx->workspace, cctx); |
| 13238 | ZSTD_freeCCtxContent(cctx); |
| 13239 | if (!cctxInWorkspace) { |
| 13240 | ZSTD_free(cctx, cctx->customMem); |
| 13241 | } |
| 13242 | } |
| 13243 | return 0; |
| 13244 | } |
| 13245 | |
| 13246 | |
| 13247 | static size_t ZSTD_sizeof_mtctx(const ZSTD_CCtx* cctx) |
no test coverage detected