comparison src/w32.c @ 36001:1d402a57bb21

(init-environment): Duplicate local string before putenv.
author Jason Rumney <jasonr@gnu.org>
date Fri, 09 Feb 2001 09:57:04 +0000
parents c26271ca6ad0
children 83dd2eb5365f
comparison
equal deleted inserted replaced
36000:f4a0b086cc5d 36001:1d402a57bb21
702 see if it succeeds. But I think that's too much to ask. */ 702 see if it succeeds. But I think that's too much to ask. */
703 if (tmp && _access (tmp, D_OK) == 0) 703 if (tmp && _access (tmp, D_OK) == 0)
704 { 704 {
705 char * var = alloca (strlen (tmp) + 8); 705 char * var = alloca (strlen (tmp) + 8);
706 sprintf (var, "TMPDIR=%s", tmp); 706 sprintf (var, "TMPDIR=%s", tmp);
707 _putenv (var); 707 _putenv (strdup (var));
708 break; 708 break;
709 } 709 }
710 } 710 }
711 if (i >= imax) 711 if (i >= imax)
712 cmd_error_internal 712 cmd_error_internal