Documentation/hooks: add pre-auto-gc hook
[gitweb.git] / builtin-branch.c
index a7844454a291d4ea1c126302d1f499497f35929a..5bc4526f645d40a4a32c50240975ad26f49b8e3b 100644 (file)
@@ -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);
 }