putenv w/ stack variable is wrong; must leak instead

This commit is contained in:
Albert Cahalan 2004-12-29 05:21:39 +00:00
parent 3b78b50124
commit 610e4254ed

View file

@ -701,7 +701,7 @@ static void set_current_language(void)
if (loc) if (loc)
{ {
snprintf(str, sizeof(str), "LANGUAGE=%s", loc); snprintf(str, sizeof(str), "LANGUAGE=%s", loc);
putenv(str); putenv(strdup(str));
} }
} }
#endif #endif