summaryrefslogtreecommitdiff
path: root/codec
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2004-07-14 10:58:11 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2004-07-14 10:58:11 +0000
commitc020831f95f2c7983513f9547efac8dc38dc667a (patch)
tree9bb1b79a4d7f3132557fccd966996d1986d30915 /codec
parent55e5910d6bfd3eeedb8e6e281feac36a44d66a6f (diff)
Allocated memory of coding parameters (cp) freed
Diffstat (limited to 'codec')
-rw-r--r--codec/image_to_j2k.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c
index d0d49f13..56508c11 100644
--- a/codec/image_to_j2k.c
+++ b/codec/image_to_j2k.c
@@ -850,6 +850,7 @@ int main(int argc, char **argv)
}
fwrite(outbuf, 1, len, f);
free(outbuf);
+ free(jp2_struct->comps);
fclose(f);
}
@@ -874,6 +875,13 @@ int main(int argc, char **argv)
}
}
+ /* Free memory */
+ free(cp_init.tcps);
+ if (tcp_init->numlayers > 9) free(cp.matrice);
+ for (tileno = 0; tileno < cp.tw * cp.th; tileno++)
+ free(cp.tcps[tileno].tccps);
+ free(cp.tcps);
+
system("pause");
return 0;
}