summaryrefslogtreecommitdiff
path: root/src/pqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pqueue.c')
-rw-r--r--src/pqueue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pqueue.c b/src/pqueue.c
index b5ddab835..80713fbba 100644
--- a/src/pqueue.c
+++ b/src/pqueue.c
@@ -17,7 +17,7 @@ int git_pqueue_init(git_pqueue *q, size_t n, git_pqueue_cmp cmppri)
assert(q);
/* Need to allocate n+1 elements since element 0 isn't used. */
- if ((q->d = malloc((n + 1) * sizeof(void *))) == NULL)
+ if ((q->d = git__malloc((n + 1) * sizeof(void *))) == NULL)
return GIT_ENOMEM;
q->size = 1;
@@ -30,7 +30,7 @@ int git_pqueue_init(git_pqueue *q, size_t n, git_pqueue_cmp cmppri)
void git_pqueue_free(git_pqueue *q)
{
- free(q->d);
+ git__free(q->d);
q->d = NULL;
}
@@ -102,7 +102,7 @@ int git_pqueue_insert(git_pqueue *q, void *d)
/* allocate more memory if necessary */
if (q->size >= q->avail) {
newsize = q->size + q->step;
- if ((tmp = realloc(q->d, sizeof(void *) * newsize)) == NULL)
+ if ((tmp = git__realloc(q->d, sizeof(void *) * newsize)) == NULL)
return GIT_ENOMEM;
q->d = tmp;