autoupdate
[gnulib.git] / lib / putenv.c
index 351b403..cc14b93 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1997, 1998, 2000, 2003, 2004, 2005, 2006, 2007
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2008
    Free Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C
@@ -31,7 +31,6 @@
 # define __set_errno(ev) ((errno) = (ev))
 #endif
 
-#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 
@@ -122,8 +121,7 @@ putenv (char *string)
                     size * sizeof (char *));
       new_environ[size] = (char *) string;
       new_environ[size + 1] = NULL;
-      if (last_environ != NULL)
-       free (last_environ);
+      free (last_environ);
       last_environ = new_environ;
       environ = new_environ;
     }