harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r613881 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c
Date Mon, 21 Jan 2008 13:25:15 GMT
Author: hindessm
Date: Mon Jan 21 05:25:14 2008
New Revision: 613881

URL: http://svn.apache.org/viewvc?rev=613881&view=rev
Log:
Probably best not to free the current bootstrap classpath while the VM
is still using it.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c?rev=613881&r1=613880&r2=613881&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c Mon
Jan 21 05:25:14 2008
@@ -291,6 +291,7 @@
     char *bootDirectory;
     char *propsFile;
     char *bootstrapClassPath = NULL;
+    char *currentBootstrapClassPath = NULL;
     vmiError rcGetProperty;
     jint returnCode;
     key_value_pair * props = NULL;
@@ -347,6 +348,9 @@
             goto cleanup;
         }
 
+        /* Save current bootstrapClassPath so we don't free it */
+        currentBootstrapClassPath = bootstrapClassPath;
+
         qsort(props, number, sizeof(key_value_pair), props_compare);
 
         for (;i < number; i++) 
@@ -365,7 +369,9 @@
                     bootstrapClassPath = str_concat (PORTLIB, 
                         bootstrapClassPath, cpSeparator,
                         bootDirectory, props[i].value, NULL);
-                    hymem_free_memory (oldPath);
+                    if (oldPath != currentBootstrapClassPath) {
+                        hymem_free_memory (oldPath);
+                    }
                 }
 
                 if (!bootstrapClassPath)



Mime
View raw message