summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-06-09 14:54:22 +0200
committerVicent Marti <tanoku@gmail.com>2010-07-10 12:15:12 -0700
commit088a731f00a39fb3158dc9150b7c8d176df51867 (patch)
treed25c9bb2bf4c052f41ead5328a068f6828d75ba2 /src/commit.c
parent58b0cbea74c160c61ec70768568e150c4d31f633 (diff)
downloadlibgit2-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/commit.c')
-rw-r--r--src/commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commit.c b/src/commit.c
index eda57c53e..58abd58a7 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -204,7 +204,7 @@ int git_commit__parse_buffer(git_commit *commit, void *data, size_t len)
if (commit->uninteresting)
parent->uninteresting = 1;
- if (git_commit_list_push_back(&commit->parents, parent))
+ if (git_commit_list_push_back(&commit->parents, parent) < 0)
return GIT_ENOMEM;
}