提交 0caea90b 编写于 作者: C Christian Couder 提交者: Junio C Hamano

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: NChristian Couder <chriscool@tuxfamily.org>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 c41e20b3
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册