From 14c71d8b5d289388ff65895a9a1df722d325a19d Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 25 Oct 2007 10:28:59 +0000 Subject: [PATCH] (init_environment): Fix tiny memory leak. --- src/ChangeLog | 4 ++++ src/w32.c | 1 + 2 files changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 5785c3df247..aab2b3e6210 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-10-25 Juanma Barranquero + + * w32.c (init_environment): Fix tiny memory leak. + 2007-10-25 Stefan Monnier Make `window-system' into a keyboard-local variable (rather than diff --git a/src/w32.c b/src/w32.c index 500e85733b2..16bec44f610 100644 --- 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; -- 2.39.2