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) ...@@ -547,7 +547,6 @@ static int pass_blame(git_blame *blame, git_blame__origin *origin, uint32_t opt)
if (porigin->blob && origin->blob && if (porigin->blob && origin->blob &&
!git_oid_cmp(git_blob_id(porigin->blob), git_blob_id(origin->blob))) { !git_oid_cmp(git_blob_id(porigin->blob), git_blob_id(origin->blob))) {
error = pass_whole_blame(blame, origin, porigin); error = pass_whole_blame(blame, origin, porigin);
goto finish;
origin_decref(porigin); origin_decref(porigin);
goto finish; goto finish;
} }
......
...@@ -212,8 +212,7 @@ int git_worktree_open_from_repository(git_worktree **out, git_repository *repo) ...@@ -212,8 +212,7 @@ int git_worktree_open_from_repository(git_worktree **out, git_repository *repo)
goto out; goto out;
out: out:
if (error) free(name);
free(name);
git_buf_free(&parent); git_buf_free(&parent);
return error; 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