Merge pull request #1484 from mayeut/mandatory-inttypes-stdint
[openjpeg.git] / src / lib / openjpip / box_manager.c
index ce520640fe69b1aef1b9d309e48d3097b2f5807e..fc3550a7ace3e89d7d413d465189e4d593ef0799 100644 (file)
@@ -33,8 +33,8 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <assert.h>
+#include <inttypes.h>
 #include "box_manager.h"
-#include "opj_inttypes.h"
 
 #ifdef SERVER
 #include "fcgi_stdio.h"
@@ -211,6 +211,7 @@ box_param_t * gene_boxbyType(int fd, OPJ_OFF_T offset, OPJ_SIZE_T length,
                 } else {
                     fprintf(FCGI_stderr, "Error: error in gene_boxbyType( %d, %" PRId64 ", %" PRId64
                             ", %s)\n", fd, offset, length, TBox);
+                    free(data);
                     return NULL;
                 }
             }