Skip to content

Commit

Permalink
Do not forget to free
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos authored and FrancescAlted committed Jun 11, 2024
1 parent a72dec9 commit 3ae32b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/codecs/zfp/blosc2-zfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,13 +864,14 @@ int zfp_getcell(void *thread_context, const uint8_t *block, int32_t cbytes, uint
}
break;
default:
free(cell);
BLOSC_TRACE_ERROR("ZFP is not available for ndims: %d", ndim);
return BLOSC2_ERROR_FAILURE;
}
memcpy(dest, &cell[cell_ind * typesize], thread_ctx->zfp_cell_nitems * typesize);
free(cell);
zfp_stream_close(zfp);
stream_close(stream);
free(cell);

if ((zfpsize == 0) || ((int32_t) zfpsize > (destsize * 8)) ||
((int32_t) zfpsize > (cell_nitems * typesize * 8)) ||
Expand Down

0 comments on commit 3ae32b6

Please sign in to comment.