]> git.eshelyaron.com Git - emacs.git/commitdiff
(init_environment): Fix tiny memory leak.
authorJuanma Barranquero <lekktu@gmail.com>
Thu, 25 Oct 2007 10:38:42 +0000 (10:38 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Thu, 25 Oct 2007 10:38:42 +0000 (10:38 +0000)
src/ChangeLog
src/w32.c

index c593aa83c0bd6e7d436b71bb919b6b0724bf3111..c5ebc4ab5a6223d345b4c610f32cf01395fdf534 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-25  Juanma Barranquero  <lekktu@gmail.com>
+
+       * w32.c (init_environment): Fix tiny memory leak.
+
 2007-10-24  Jason Rumney  <jasonr@gnu.org>
 
        * w32fns.c: Include math.h.
index 2b54f3d59dcb7dc71024ab6132ecd3ecd0eda74e..743eac99e7ce0a73239ef67a8d5c95a94470b529 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -1112,6 +1112,7 @@ init_environment (char ** argv)
                /* Also ignore empty environment variables.  */
                || *lpval == 0)
              {
+               if (lpval) xfree (lpval);
                lpval = env_vars[i].def_value;
                dwType = REG_EXPAND_SZ;
                dont_free = 1;