Index: native-src/shared/launcher/main.c =================================================================== --- native-src/shared/launcher/main.c.orig 2006-05-25 12:24:55.000000000 +0100 +++ native-src/shared/launcher/main.c 2006-05-25 14:00:02.000000000 +0100 @@ -106,6 +106,7 @@ char **argv = args->argv; char *vmdll; char *mainClass = NULL; + char *mainClassAlloc = NULL; int isStandaloneJar = 0; int copyrightWritten = 0; int versionWritten = 0; @@ -221,6 +222,7 @@ /* We are a tool launcher: main class deduced from exe name */ mainClass = hymem_allocate_memory ( strlen(HY_TOOLS_PACKAGE) + strlen(exeBaseName) + strlen (HY_TOOLS_MAIN_TYPE) + 3); + mainClassAlloc = mainClass; if (mainClass == NULL) { /* HYNLS_EXELIB_INTERNAL_VM_ERR_OUT_OF_MEMORY=Internal VM error: Out of memory\n */ PORTLIB->nls_printf (PORTLIB, HYNLS_ERROR, HYNLS_EXELIB_INTERNAL_VM_ERR_OUT_OF_MEMORY); @@ -354,9 +356,9 @@ { hymem_free_memory (exeName); } - if (mainClass) + if (mainClassAlloc) { - hymem_free_memory (mainClass); + hymem_free_memory (mainClassAlloc); } if (propertiesFileName) {