Merge branch 'jm/free'
[git/git.git] / builtin-branch.c
index a784445..5bc4526 100644 (file)
@@ -121,8 +121,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
                        continue;
                }
 
                        continue;
                }
 
-               if (name)
-                       free(name);
+               free(name);
 
                name = xstrdup(mkpath(fmt, argv[i]));
                if (!resolve_ref(name, sha1, 1, NULL)) {
 
                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);
 }
 
        return(ret);
 }