You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2006/05/26 12:13:30 UTC

[jira] Commented: (HARMONY-503) Launcher allocates exeName twice and never frees it

    [ http://issues.apache.org/jira/browse/HARMONY-503?page=comments#action_12413421 ] 

Mark Hindess commented on HARMONY-503:
--------------------------------------

Two points:

1)  My original patch had:

+  endPathPtr = exeBaseName = strrchr(exeName, HY_PATH_SLASH);

but the 'endPathPtr = ' is redundant since it is set in both if and else clauses below.

2) My original patch had:

+  if (exeName)
+  {
+         hymem_free_memory (exeName);
+  }

but yours had a cut'n'paste error:

+  if (exeName) {
+    hymem_free_memory (mainClass);
+  }

That is, mainClass should read exeName.




> Launcher allocates exeName twice and never frees it
> ---------------------------------------------------
>
>          Key: HARMONY-503
>          URL: http://issues.apache.org/jira/browse/HARMONY-503
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Tim Ellison
>     Priority: Minor
>  Attachments: launcher.exename.allocd.twice.never.freed.diff
>
> Launcher main.c gpProtectedMain calls hysysinfo_get_executable_name twice.  It should only be called once.  Also the memory alloc'd by this call is not freed.
> I will attach a patch.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira