diff options
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2012-09-04 19:30:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-04 22:34:46 +0200 |
commit | d292bfaf356338b41e14e40ce4dbd6b9c8d600ec (patch) | |
tree | de4467f56e9d534169cd05b6a25e4a8e6ca60a73 /bisect.c | |
parent | path.c: Use vsnpath() in the implementation of git_path() (diff) | |
download | git-d292bfaf356338b41e14e40ce4dbd6b9c8d600ec.tar.xz git-d292bfaf356338b41e14e40ce4dbd6b9c8d600ec.zip |
Call git_pathdup() rather than xstrdup(git_path("..."))
In addition to updating the two xstrdup(git_path("...")) call sites
with git_pathdup(), we also fix a memory leak by freeing the memory
allocated to the ADD_EDIT.patch 'file' in the edit_patch() function.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bisect.c')
-rw-r--r-- | bisect.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -833,7 +833,7 @@ static int check_ancestors(const char *prefix) */ static void check_good_are_ancestors_of_bad(const char *prefix, int no_checkout) { - char *filename = xstrdup(git_path("BISECT_ANCESTORS_OK")); + char *filename = git_pathdup("BISECT_ANCESTORS_OK"); struct stat st; int fd; |