Skip to content

Commit fbdf2a7

Browse files
committed
worktree: unconditionally free the worktree's name
1 parent 4004d68 commit fbdf2a7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/worktree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,7 @@ int git_worktree_open_from_repository(git_worktree **out, git_repository *repo)
212212
goto out;
213213

214214
out:
215-
if (error)
216-
free(name);
215+
free(name);
217216
git_buf_free(&parent);
218217

219218
return error;

0 commit comments

Comments
 (0)