Skip to content

Commit a25df00

Browse files
authored
Merge pull request libgit2#4180 from pks-t/pks/pass-blame-fix
Fix memory leaks
2 parents 1d39a60 + fbdf2a7 commit a25df00

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/blame_git.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@ static int pass_blame(git_blame *blame, git_blame__origin *origin, uint32_t opt)
547547
if (porigin->blob && origin->blob &&
548548
!git_oid_cmp(git_blob_id(porigin->blob), git_blob_id(origin->blob))) {
549549
error = pass_whole_blame(blame, origin, porigin);
550-
goto finish;
551550
origin_decref(porigin);
552551
goto finish;
553552
}

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)