diff options
| author | Vicent Marti <tanoku@gmail.com> | 2010-06-09 14:54:22 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2010-07-10 12:15:12 -0700 |
| commit | 088a731f00a39fb3158dc9150b7c8d176df51867 (patch) | |
| tree | d25c9bb2bf4c052f41ead5328a068f6828d75ba2 /src/revwalk.c | |
| parent | 58b0cbea74c160c61ec70768568e150c4d31f633 (diff) | |
| download | libgit2-088a731f00a39fb3158dc9150b7c8d176df51867.tar.gz | |
Fixed memory leaks in test suite
Created commit objects in t0401-parse weren't being freed properly.
Updated the API documentation to note that commit objects are owned
by the revision pool and should not be freed manually.
The parents list of each commit was being freed twice after each test.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/revwalk.c')
| -rw-r--r-- | src/revwalk.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/revwalk.c b/src/revwalk.c index c3b53a351..431007a7f 100644 --- a/src/revwalk.c +++ b/src/revwalk.c @@ -54,6 +54,7 @@ void gitrp_free(git_revpool *walk) git_revpool_tableit_init(walk->commits, &it); while ((commit = (git_commit *)git_revpool_tableit_next(&it)) != NULL) { + git_commit_list_clear(&commit->parents, 0); free(commit); } |
