]> granicus.if.org Git - openjpeg/commitdiff
[trunk] Remove mem leak and warning reported by clang
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 7 Mar 2014 11:17:51 +0000 (11:17 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 7 Mar 2014 11:17:51 +0000 (11:17 +0000)
src/bin/jp2/opj_compress.c

index 799230c1a12f9a8a81d38565dfe0acb9b841aeab..0f1b9580abf1da8a3fb50bbb8df54d2468e3721b 100644 (file)
@@ -408,9 +408,7 @@ static int get_file_format(char *filename) {
 }
 
 static char * get_file_name(char *name){
-    char *fname;
-    fname= (char*)malloc(OPJ_PATH_LEN*sizeof(char));
-    fname= strtok(name,".");
+    char *fname = strtok(name,".");
     return fname;
 }