8015299: Memory leak in jdk/src/solaris/bin/java_md_solinux.c
authorjzavgren
Thu, 30 May 2013 12:19:10 +0100
changeset 17911 04141bd79ced
parent 17910 82d10099a8a6
child 17912 c1a0b2bc41ab
8015299: Memory leak in jdk/src/solaris/bin/java_md_solinux.c Reviewed-by: martin, dholmes, chegar, ksrini
jdk/src/solaris/bin/java_md_solinux.c
--- a/jdk/src/solaris/bin/java_md_solinux.c	Wed May 29 19:50:47 2013 -0700
+++ b/jdk/src/solaris/bin/java_md_solinux.c	Thu May 30 12:19:10 2013 +0100
@@ -649,9 +649,9 @@
                         && (dmpath == NULL) /* data model specific variables not set  */
 #endif /* __solaris__ */
                         ) {
-
+                    JLI_MemFree(newargv);
+                    JLI_MemFree(new_runpath);
                     return;
-
                 }
             }
 
@@ -935,7 +935,7 @@
         char buf[PATH_MAX+1];
         int len = readlink(self, buf, PATH_MAX);
         if (len >= 0) {
-            buf[len] = '\0';            /* readlink doesn't nul terminate */
+            buf[len] = '\0';            /* readlink(2) doesn't NUL terminate */
             exec_path = JLI_StringDup(buf);
         }
     }