From a8d6819ab32b70c5ea71b22bde1601b99e646b4d Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 25 Oct 2007 10:38:42 +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 c593aa83c0b..c5ebc4ab5a6 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-24 Jason Rumney * w32fns.c: Include math.h. diff --git a/src/w32.c b/src/w32.c index 2b54f3d59dc..743eac99e7c 100644 --- 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; -- 2.39.2