Merge branch 'jm/free'

* jm/free:
  Avoid unnecessary "if-before-free" tests.

Conflicts:

	builtin-branch.c
This commit is contained in:
Junio C Hamano
2008-02-27 13:03:50 -08:00
17 changed files with 27 additions and 53 deletions

View 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);
}