Jorge Acereda Maciá wrote:
> Hi,
>
> I'd say the error is upwards. I mean, I'd expect vm_executable_path()  
> to return an immutable string (somewhat reinforced by the fact that  
> it returns "const char *"). And in fact, there's code in factor.c  
> that assumes this, since it does:
>
>          const F_CHAR *executable_path = vm_executable_path();
>          if(!executable_path)
>                  executable_path = argv[0];
>
> I wouldn't attempt to free() the memory at argv[0] .

You're absolutely right. I've fixed this. vm_image_path() no longer 
calls safe_realloc(), instead it calls safe_malloc() and copies the 
string there.

Slava

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to