Commit a25df009 by Patrick Steinhardt Committed by GitHub

Merge pull request #4180 from pks-t/pks/pass-blame-fix

Fix memory leaks
parents 1d39a603 fbdf2a79
......@@ -547,7 +547,6 @@ static int pass_blame(git_blame *blame, git_blame__origin *origin, uint32_t opt)
if (porigin->blob && origin->blob &&
!git_oid_cmp(git_blob_id(porigin->blob), git_blob_id(origin->blob))) {
error = pass_whole_blame(blame, origin, porigin);
goto finish;
origin_decref(porigin);
goto finish;
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment