Ticket #43008: patch-lib-runcmd.c.diff
File patch-lib-runcmd.c.diff, 554 bytes (added by jul_bsd@…, 10 years ago) |
---|
-
lib/runcmd.c
old new 587 587 /* For Solaris and systems that don't have setenv(). 588 588 * This will leak memory, but in a "controlled" way, since the memory 589 589 * should be freed when the child process exits. */ 590 if (asprintf(&env_string, "%s=%s", name, value) = -1) return -1;590 if (asprintf(&env_string, "%s=%s", name, value) == -1) return -1; 591 591 if (!env_string) { 592 errno = =ENOMEM;592 errno = ENOMEM; 593 593 return -1; 594 594 } 595 595 return putenv(env_string);