summaryrefslogtreecommitdiff
path: root/src/bin/jp2/convertbmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/jp2/convertbmp.c')
-rw-r--r--src/bin/jp2/convertbmp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/jp2/convertbmp.c b/src/bin/jp2/convertbmp.c
index 0678d9d3..78ca4af5 100644
--- a/src/bin/jp2/convertbmp.c
+++ b/src/bin/jp2/convertbmp.c
@@ -729,6 +729,7 @@ opj_image_t* bmptoimage(const char *filename, opj_cparameters_t *parameters)
image = opj_image_create(numcmpts, &cmptparm[0], (numcmpts == 1U) ? OPJ_CLRSPC_GRAY : OPJ_CLRSPC_SRGB);
if(!image) {
fclose(IN);
+ free(pData);
return NULL;
}
if (numcmpts == 4U) {