Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-10-29 01:51:13 +0400
committerVicent Marti <tanoku@gmail.com>2011-10-29 06:02:36 +0400
commit3286c408eccb18c525ca123383f3ebf5097441bc (patch)
tree4422fe16ab4f7b9cf713e0209cbb74fb4115889e /src/commit.c
parentda37654d04617b4dacce6e7a4796007d2854624d (diff)
global: Properly use `git__` memory wrappers
Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/commit.c b/src/commit.c
index ced457ecc..b9eb3650f 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -32,7 +32,7 @@ static void clear_parents(git_commit *commit)
for (i = 0; i < commit->parent_oids.length; ++i) {
git_oid *parent = git_vector_get(&commit->parent_oids, i);
- free(parent);
+ git__free(parent);
}
git_vector_clear(&commit->parent_oids);
@@ -46,9 +46,9 @@ void git_commit__free(git_commit *commit)
git_signature_free(commit->author);
git_signature_free(commit->committer);
- free(commit->message);
- free(commit->message_encoding);
- free(commit);
+ git__free(commit->message);
+ git__free(commit->message_encoding);
+ git__free(commit);
}
const git_oid *git_commit_id(git_commit *c)
@@ -84,7 +84,7 @@ int git_commit_create_v(
message_encoding, message,
tree, parent_count, parents);
- free((void *)parents);
+ git__free((void *)parents);
return error;
}