aboutsummaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-08-19 20:46:30 +0200
committerJunio C Hamano <gitster@pobox.com>2008-08-19 21:09:30 -0700
commitc71e917975ecd5fdc4caef245cf18b244213e3f6 (patch)
treece4300f1a50e64f73a0762c0b25b65536d7215d2 /remote.c
parente9d7d10a7f17fb9cc6a4d37b6fdf27170f4deede (diff)
downloadgit-c71e917975ecd5fdc4caef245cf18b244213e3f6.tar.gz
git-c71e917975ecd5fdc4caef245cf18b244213e3f6.tar.xz
remote.c: remove useless if-before-free test
We removed a handful of these useless if-before-free tests several months ago. This change removes a new one that snuck back in. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/remote.c b/remote.c
index f61a3ab39..105668f8a 100644
--- a/remote.c
+++ b/remote.c
@@ -579,8 +579,7 @@ int valid_fetch_refspec(const char *fetch_refspec_str)
struct refspec *refspec;
refspec = parse_refspec_internal(1, fetch_refspec, 1, 1);
- if (refspec)
- free(refspec);
+ free(refspec);
return !!refspec;
}