Memory leak fix + Comment inserted in codestream: "Created by OpenJPEG version 0.9"
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Wed, 14 Jul 2004 13:00:57 +0000 (13:00 +0000)
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Wed, 14 Jul 2004 13:00:57 +0000 (13:00 +0000)
codec/image_to_j2k.c

index 56508c11b2dcd26ae43407dc95eadacb16b5b857..d07f23e4837c1d84ab28b8f48219d43333b6885d 100644 (file)
@@ -300,7 +300,7 @@ int main(int argc, char **argv)
   Dim[1] = 0;
   TX0 = 0;
   TY0 = 0;
-  cp.comment = NULL;
+  cp.comment = "Created by OpenJPEG version 0.9";
   cp.disto_alloc = 0;
   cp.fixed_alloc = 0;
   cp.fixed_quality = 0;                //add fixed_quality
@@ -876,6 +876,7 @@ int main(int argc, char **argv)
   }
 
   /* Free memory */
+  free(img.comps);
   free(cp_init.tcps);
   if (tcp_init->numlayers > 9) free(cp.matrice);
   for (tileno = 0; tileno < cp.tw * cp.th; tileno++)