worktree: unconditionally free the worktree's name
diff --git a/src/worktree.c b/src/worktree.c
index 393a088..55fbf52 100644
--- a/src/worktree.c
+++ b/src/worktree.c
@@ -212,8 +212,7 @@ int git_worktree_open_from_repository(git_worktree **out, git_repository *repo)
goto out;
out:
- if (error)
- free(name);
+ free(name);
git_buf_free(&parent);
return error;