1 // commit 9543656cc32fda48fc463f332ee20e91eed2b768 2016-03-06 2 // __putenv could be confused into freeing storage that does not belong to the implementation 3 #define _XOPEN_SOURCE 700 4 #include <stdlib.h> 5 #include <string.h> 6 main(void)7int main(void) 8 { 9 setenv("A", "1", 1); 10 setenv("A", "2", 1); 11 char *c = strdup("A=3"); 12 putenv(c); 13 setenv("A", "4", 1); 14 free(c); 15 return 0; 16 } 17