diff --git a/remote.c b/remote.c index f61a3ab399..105668f8a3 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; }