From 088a731f00a39fb3158dc9150b7c8d176df51867 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Wed, 9 Jun 2010 14:54:22 +0200 Subject: 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 --- src/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/commit.c') 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; } -- cgit v1.2.1