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
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2012-09-04 21:31:14 +0400
committerJunio C Hamano <gitster@pobox.com>2012-09-05 00:34:46 +0400
commit4e2d094dde4f078245d057dd6111ab9d013ae6d0 (patch)
tree208226504d771a78580d6f8a78277134c3b3ecc1 /builtin/branch.c
parentd292bfaf356338b41e14e40ce4dbd6b9c8d600ec (diff)
Call mkpathdup() rather than xstrdup(mkpath(...))
In addition to updating the xstrdup(mkpath(...)) call sites with mkpathdup(), we also fix a memory leak (in merge_3way()) caused by neglecting to free the memory allocated to the 'base_name' variable. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/branch.c')
-rw-r--r--builtin/branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 0e060f2e4a..bdf8495aa6 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -196,7 +196,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
free(name);
- name = xstrdup(mkpath(fmt, bname.buf));
+ name = mkpathdup(fmt, bname.buf);
if (read_ref(name, sha1)) {
error(remote_branch
? _("remote branch '%s' not found.")