diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-27 22:03:50 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-27 22:03:50 +0100 |
commit | 3d0a936f63f2f894b3986d96cdd8f2baae96150c (patch) | |
tree | f661256c3756d9d74ea2cd045115e5488f53388f /builtin-branch.c | |
parent | Merge branch 'js/branch-track' (diff) | |
parent | Avoid unnecessary "if-before-free" tests. (diff) | |
download | git-3d0a936f63f2f894b3986d96cdd8f2baae96150c.tar.xz git-3d0a936f63f2f894b3986d96cdd8f2baae96150c.zip |
Merge branch 'jm/free'
* jm/free:
Avoid unnecessary "if-before-free" tests.
Conflicts:
builtin-branch.c
Diffstat (limited to 'builtin-branch.c')
-rw-r--r-- | builtin-branch.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin-branch.c b/builtin-branch.c index a7844454a2..5bc4526f64 100644 --- a/builtin-branch.c +++ b/builtin-branch.c @@ -121,8 +121,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds) continue; } - if (name) - free(name); + free(name); name = xstrdup(mkpath(fmt, argv[i])); if (!resolve_ref(name, sha1, 1, NULL)) { @@ -167,8 +166,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds) } } - if (name) - free(name); + free(name); return(ret); } |