about summary refs log tree commit diff
path: root/stdlib/setenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/setenv.c')
-rw-r--r--stdlib/setenv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/stdlib/setenv.c b/stdlib/setenv.c
index 710da1383c..b60c4f0151 100644
--- a/stdlib/setenv.c
+++ b/stdlib/setenv.c
@@ -217,6 +217,13 @@ __add_to_environ (name, value, combined, replace)
 	      /* And remember the value.  */
 	      STORE_VALUE (np);
 	    }
+#ifdef USE_TSEARCH
+	  else
+	    {
+	      if (__glibc_unlikely (! use_alloca))
+		free (new_value);
+	    }
+#endif
 	}
 
       *ep = np;