Ticket #1140: tt1140-minimalist-fix.patch

File tt1140-minimalist-fix.patch, 0.6 KB (added by doughera, 5 years ago)

A minimalist fix for generic/env.c

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

    old new  
    7474void 
    7575Parrot_unsetenv(PARROT_INTERP, STRING *str_name) 
    7676{ 
    77     char * const name = Parrot_str_to_cstring(interp, str_name); 
    7877#ifdef PARROT_HAS_UNSETENV 
     78    char * const name = Parrot_str_to_cstring(interp, str_name); 
    7979    unsetenv(name); 
     80    Parrot_str_free_cstring(name); 
    8081#else 
    81     Parrot_setenv(name, ""); 
     82    Parrot_setenv(interp, str_name, Parrot_str_new(interp, "", 0)); 
    8283#endif 
    83     Parrot_str_free_cstring(name); 
    8484} 
    8585 
    8686/*