Commit 146f5c75 by Carlos Martín Nieto

repo: plug a couple of leaks

parent e77e53ed
...@@ -301,6 +301,8 @@ static int find_repo( ...@@ -301,6 +301,8 @@ static int find_repo(
if (!(error = read_gitfile(&repo_link, path.ptr))) { if (!(error = read_gitfile(&repo_link, path.ptr))) {
if (valid_repository_path(&repo_link)) if (valid_repository_path(&repo_link))
git_buf_swap(repo_path, &repo_link); git_buf_swap(repo_path, &repo_link);
git_buf_free(&repo_link);
break; break;
} }
git_buf_free(&repo_link); git_buf_free(&repo_link);
...@@ -376,6 +378,7 @@ int git_repository_open_ext( ...@@ -376,6 +378,7 @@ int git_repository_open_ext(
return error; return error;
} }
git_buf_free(&parent);
*repo_ptr = repo; *repo_ptr = repo;
return 0; return 0;
} }
......
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