diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-09-30 11:12:05 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-09-30 11:12:05 -0700 |
commit | d53e6fdb0a86ca1ddb12876a60f7f2d7508b5349 (patch) | |
tree | 1d1eebf565936adff5d2d5c68741774e8d86f0eb /core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c | |
parent | 1b24b697659b9b933f336238665c835497464a0b (diff) | |
download | pdfium-d53e6fdb0a86ca1ddb12876a60f7f2d7508b5349.tar.xz |
Update openjpeg
BUG=407964, 414182, 413447
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/589243004
Diffstat (limited to 'core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c')
-rw-r--r-- | core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c index 18fcc47605..075594b939 100644 --- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c +++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c @@ -362,7 +362,9 @@ static INLINE void opj_mqc_renormd(opj_mqc_t *const mqc) { opj_mqc_t* opj_mqc_create(void) { opj_mqc_t *mqc = (opj_mqc_t*)opj_malloc(sizeof(opj_mqc_t)); #ifdef MQC_PERF_OPT - mqc->buffer = NULL; + if (mqc) { + mqc->buffer = NULL; + } #endif return mqc; } @@ -370,7 +372,9 @@ opj_mqc_t* opj_mqc_create(void) { void opj_mqc_destroy(opj_mqc_t *mqc) { if(mqc) { #ifdef MQC_PERF_OPT - opj_free(mqc->buffer); + if (mqc->buffer) { + opj_free(mqc->buffer); + } #endif opj_free(mqc); } |