document memory leak in relocate.cc
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 16 Jan 2007 22:49:16 +0000 (23:49 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 17 Jan 2007 14:51:19 +0000 (15:51 +0100)
lily/relocate.cc

index ac4c31bac4658673c9af16e3b9f0363ef969b783..d7aed8133c586dc1c191649c62f0a1120746c804 100644 (file)
@@ -43,7 +43,12 @@ sane_putenv (char const *key, string value, bool overwrite)
       if (be_verbose_global)
        progress_indication (_f ("Setting %s to %s\n" , key, value.c_str ())); 
                             
-      return putenv (s);
+      int retval =  putenv (s);
+      /*
+       unfortunately, we can't portably free S here,
+       due to various bugs in glibc prior to 2.1.1
+       */ 
+      return retval;
     }
   
   return -1;