summaryrefslogtreecommitdiff
path: root/src/util/container_heap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/container_heap.c')
-rw-r--r--src/util/container_heap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/container_heap.c b/src/util/container_heap.c
index 0f63f957d..54da89f7a 100644
--- a/src/util/container_heap.c
+++ b/src/util/container_heap.c
@@ -142,7 +142,7 @@ GNUNET_CONTAINER_heap_create (enum GNUNET_CONTAINER_HeapOrder order)
{
struct GNUNET_CONTAINER_Heap *heap;
- heap = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_Heap));
+ heap = GNUNET_new (struct GNUNET_CONTAINER_Heap);
heap->order = order;
return heap;
}
@@ -351,7 +351,7 @@ GNUNET_CONTAINER_heap_insert (struct GNUNET_CONTAINER_Heap *heap, void *element,
{
struct GNUNET_CONTAINER_HeapNode *node;
- node = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_HeapNode));
+ node = GNUNET_new (struct GNUNET_CONTAINER_HeapNode);
node->heap = heap;
node->element = element;
node->cost = cost;