Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2006-09-05 10:22:16 +0400
committerJunio C Hamano <junkio@cox.net>2006-09-06 04:40:49 +0400
commit0caea90be0e565a923b69df7b32c13cbcf892d6d (patch)
tree90da9270a6ebd65dc6851edd763f5e92fcd47819 /git.c
parentc41e20b30b2bd4b8167917336676cde6f6aadd06 (diff)
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 <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git.c')
-rw-r--r--git.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/git.c b/git.c
index 1d00111819..335f405c20 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)