From: Christian Couder Date: Tue, 5 Sep 2006 06:22:16 +0000 (+0200) Subject: Fix memory leak in prepend_to_path (git.c). X-Git-Tag: v1.4.3-rc1~132 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0caea90be0e565a923b69df7b32c13cbcf892d6d;p=git.git Fix memory leak in prepend_to_path (git.c). Some memory was allocated for a new path but not freed after the path was used. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- diff --git a/git.c b/git.c index 1d0011181..335f405c2 100644 --- a/git.c +++ b/git.c @@ -36,6 +36,8 @@ static void prepend_to_path(const char *dir, int len) memcpy(path + len + 1, old_path, path_len - len); setenv("PATH", path, 1); + + free(path); } static int handle_options(const char*** argv, int* argc)