diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-10-29 01:51:13 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-10-29 06:02:36 +0400 |
commit | 3286c408eccb18c525ca123383f3ebf5097441bc (patch) | |
tree | 4422fe16ab4f7b9cf713e0209cbb74fb4115889e /src/oid.c | |
parent | da37654d04617b4dacce6e7a4796007d2854624d (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/oid.c')
-rw-r--r-- | src/oid.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -223,7 +223,7 @@ struct git_oid_shorten { static int resize_trie(git_oid_shorten *self, size_t new_size) { - self->nodes = realloc(self->nodes, new_size * sizeof(trie_node)); + self->nodes = git__realloc(self->nodes, new_size * sizeof(trie_node)); if (self->nodes == NULL) return GIT_ENOMEM; @@ -270,7 +270,7 @@ git_oid_shorten *git_oid_shorten_new(size_t min_length) memset(os, 0x0, sizeof(git_oid_shorten)); if (resize_trie(os, 16) < GIT_SUCCESS) { - free(os); + git__free(os); return NULL; } @@ -282,8 +282,8 @@ git_oid_shorten *git_oid_shorten_new(size_t min_length) void git_oid_shorten_free(git_oid_shorten *os) { - free(os->nodes); - free(os); + git__free(os->nodes); + git__free(os); } |