Skip to content

Commit 3ae32b6

Browse files
DimitriPapadopoulosFrancescAlted
authored andcommitted
Do not forget to free
1 parent a72dec9 commit 3ae32b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/codecs/zfp/blosc2-zfp.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -864,13 +864,14 @@ int zfp_getcell(void *thread_context, const uint8_t *block, int32_t cbytes, uint
864864
}
865865
break;
866866
default:
867+
free(cell);
867868
BLOSC_TRACE_ERROR("ZFP is not available for ndims: %d", ndim);
868869
return BLOSC2_ERROR_FAILURE;
869870
}
870871
memcpy(dest, &cell[cell_ind * typesize], thread_ctx->zfp_cell_nitems * typesize);
872+
free(cell);
871873
zfp_stream_close(zfp);
872874
stream_close(stream);
873-
free(cell);
874875

875876
if ((zfpsize == 0) || ((int32_t) zfpsize > (destsize * 8)) ||
876877
((int32_t) zfpsize > (cell_nitems * typesize * 8)) ||

0 commit comments

Comments
 (0)