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

index 5785c3df247a53b96e204a01e57774a407df61d4..aab2b3e621036caf6c300db68671593ba2a7a499 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-25  Juanma Barranquero  <lekktu@gmail.com>
+
+       * w32.c (init_environment): Fix tiny memory leak.
+
 2007-10-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        Make `window-system' into a keyboard-local variable (rather than
index 500e85733b24ddb5fea24282cf9a01681cfbc315..16bec44f610e296412df58629f47482910bd5e1b 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -1149,6 +1149,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;