Module Name: src
Committed By: tron
Date: Sat Sep 25 19:10:37 UTC 2010
Modified Files:
src/lib/libc/stdlib: setenv.c
Log Message:
Remember the correct pointer which we will free later.
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libc/stdlib/setenv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/stdlib/setenv.c
diff -u src/lib/libc/stdlib/setenv.c:1.36 src/lib/libc/stdlib/setenv.c:1.37
--- src/lib/libc/stdlib/setenv.c:1.36 Sat Sep 25 18:11:40 2010
+++ src/lib/libc/stdlib/setenv.c Sat Sep 25 19:10:37 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: setenv.c,v 1.36 2010/09/25 18:11:40 tron Exp $ */
+/* $NetBSD: setenv.c,v 1.37 2010/09/25 19:10:37 tron Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setenv.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: setenv.c,v 1.36 2010/09/25 18:11:40 tron Exp $");
+__RCSID("$NetBSD: setenv.c,v 1.37 2010/09/25 19:10:37 tron Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -118,7 +118,7 @@
*c++ = '=';
free(__environ_malloced[offset]);
- __environ_malloced[offset] = c;
+ __environ_malloced[offset] = environ[offset];
copy:
(void)memcpy(c, value, l_value + 1);