summaryrefslogtreecommitdiff
path: root/libopenjpeg/jp2.c
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2011-12-07 09:53:46 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2011-12-07 09:53:46 +0000
commit90eeb25770f567c1f76be1958592326fda5ce42b (patch)
tree3ccfeb7a2605a60421a3ddf1ad28d554a4470339 /libopenjpeg/jp2.c
parentbfe8b81d187aa49662f3700575c9c433f0c667df (diff)
[trunk] remove some warnings detected by cppcheck
Diffstat (limited to 'libopenjpeg/jp2.c')
-rw-r--r--libopenjpeg/jp2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c
index 96db0473..19c0080c 100644
--- a/libopenjpeg/jp2.c
+++ b/libopenjpeg/jp2.c
@@ -2047,6 +2047,10 @@ opj_bool jp2_read_header_procedure(
if (l_current_handler != 00) {
if (l_current_data_size > l_last_data_size) {
l_current_data = (unsigned char*)opj_realloc(l_current_data,l_current_data_size);
+ if (!l_current_data){
+ opj_free(l_current_data);
+ return OPJ_FALSE;
+ }
l_last_data_size = l_current_data_size;
}