From c71e917975ecd5fdc4caef245cf18b244213e3f6 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 19 Aug 2008 20:46:30 +0200 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- remote.c | 3 +-- 1 file changed, 1 insertion(+), 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; } -- 2.30.2