diff options
author | Patrick Steinhardt <ps@pks.im> | 2017-03-28 08:38:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-28 08:38:24 +0200 |
commit | a25df009ef7f89fb8cbb26fb78e6c2e960a6c18b (patch) | |
tree | ff76102f72ff00ec5a46a0eb41b5280f17e6f48e | |
parent | 1d39a603198e2b93a15d4e744fa664b56e8b464d (diff) | |
parent | fbdf2a79d5b6f3f4c9a7abdd971f9f3cb133e157 (diff) | |
download | libgit2-a25df009ef7f89fb8cbb26fb78e6c2e960a6c18b.tar.gz |
Merge pull request #4180 from pks-t/pks/pass-blame-fix
Fix memory leaks
-rw-r--r-- | src/blame_git.c | 1 | ||||
-rw-r--r-- | src/worktree.c | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/blame_git.c b/src/blame_git.c index 735b62d95..6d2f1531f 100644 --- a/src/blame_git.c +++ b/src/blame_git.c @@ -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; } diff --git a/src/worktree.c b/src/worktree.c index 393a088fe..55fbf5204 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; |