Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2495)

Unified Diff: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c

Issue 589243004: Update openjpeg (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Update to openjpeg r2891 Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c
index 18fcc476059c8518543ca15709b43e52cecb0c26..075594b939947ed2af4ec2e3323e134d36a383ad 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);
}
« no previous file with comments | « core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.c ('k') | core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698