diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2006-09-05 08:22:16 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-05 17:40:49 -0700 |
commit | 0caea90be0e565a923b69df7b32c13cbcf892d6d (patch) | |
tree | 90da9270a6ebd65dc6851edd763f5e92fcd47819 /git.c | |
parent | send-pack: remove remote reference limit (diff) | |
download | tgif-0caea90be0e565a923b69df7b32c13cbcf892d6d.tar.xz |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) |