summaryrefslogtreecommitdiff
path: root/libopenjpeg/jp2.c
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-02-26 08:38:19 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-02-26 08:38:19 +0000
commit6aad1208b202b31a0725eafc0da0dda3059b0272 (patch)
treefecc910a7bb55997347f10a6d558cbc1aa2d9e84 /libopenjpeg/jp2.c
parentd2be8c5d214f7dc28cb6a951ab1e8b2d2280499d (diff)
[1.5] Import first patch (fixes.patch) from issue 249 to fix leaks on error condition.
Update issue 249
Diffstat (limited to 'libopenjpeg/jp2.c')
-rw-r--r--libopenjpeg/jp2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c
index 531bbfc9..a53e3f5c 100644
--- a/libopenjpeg/jp2.c
+++ b/libopenjpeg/jp2.c
@@ -1095,6 +1095,7 @@ void jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters) {
opj_jp2_t* jp2_create_compress(opj_common_ptr cinfo) {
opj_jp2_t *jp2 = (opj_jp2_t*)opj_malloc(sizeof(opj_jp2_t));
if(jp2) {
+ memset(jp2, 0, sizeof(opj_jp2_t));
jp2->cinfo = cinfo;
/* create the J2K codec */
jp2->j2k = j2k_create_compress(cinfo);