Ticket #1953: tt1953.patch

File tt1953.patch, 0.5 KB (added by doughera, 11 years ago)

Don't free string passed to putenv().

  • config/gen/platform/generic/env.c

    diff --git a/config/gen/platform/generic/env.c b/config/gen/platform/generic/env.c
    index 5cac4a5..b3f3533 100644
    a b  
    4949                            str_value); 
    5050    char *envs = Parrot_str_to_platform_cstring(interp, str_envs); 
    5151    putenv(envs); 
    52     Parrot_str_free_cstring(envs); 
     52    /* Can't free envs because the environment may still be 
     53       using it. 
     54    */ 
    5355#endif 
    5456} 
    5557