diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-04-14 15:09:29 +0200 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-04-14 15:09:29 +0200 |
commit | 146f5c75d73229cc0d6a4fcebf5d81f90d54b1d3 (patch) | |
tree | d6ef3a793b025c52f5e4a77cc5d0d8bddcfaf116 | |
parent | e77e53edb37b7dd603da7758b243ef8e91d9e394 (diff) | |
download | libgit2-146f5c75d73229cc0d6a4fcebf5d81f90d54b1d3.tar.gz |
repo: plug a couple of leaks
-rw-r--r-- | src/repository.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/repository.c b/src/repository.c index 413bb17ae..18881ecce 100644 --- a/src/repository.c +++ b/src/repository.c @@ -301,6 +301,8 @@ static int find_repo( if (!(error = read_gitfile(&repo_link, path.ptr))) { if (valid_repository_path(&repo_link)) git_buf_swap(repo_path, &repo_link); + + git_buf_free(&repo_link); break; } git_buf_free(&repo_link); @@ -376,6 +378,7 @@ int git_repository_open_ext( return error; } + git_buf_free(&parent); *repo_ptr = repo; return 0; } |