aboutsummaryrefslogtreecommitdiff
path: root/contrib/bind9/lib/isc/heap.c
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2011-09-03 07:13:45 +0000
committerDoug Barton <dougb@FreeBSD.org>2011-09-03 07:13:45 +0000
commit6fae67da247296c5844ea54a5fc238184ed50046 (patch)
treedf1f07c78f187c54ea276c24753c42174127668e /contrib/bind9/lib/isc/heap.c
parent1d449f95f29a1b01342ee6c733f8dcac9f4dce3c (diff)
parent4a28185ca651dac3b9efa694040b80ab0eaa0690 (diff)
downloadsrc-6fae67da247296c5844ea54a5fc238184ed50046.tar.gz
src-6fae67da247296c5844ea54a5fc238184ed50046.zip
Upgrade to BIND version 9.8.1. Release notes at:
https://deepthought.isc.org/article/AA-00446/81/ or /usr/src/contrib/bind9/ Approved by: re (kib)
Notes
Notes: svn path=/head/; revision=225361
Diffstat (limited to 'contrib/bind9/lib/isc/heap.c')
-rw-r--r--contrib/bind9/lib/isc/heap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/bind9/lib/isc/heap.c b/contrib/bind9/lib/isc/heap.c
index 4dead3f3ca05..eeef7f7b67e6 100644
--- a/contrib/bind9/lib/isc/heap.c
+++ b/contrib/bind9/lib/isc/heap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2010 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2010, 2011 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: heap.c,v 1.39 2010-02-04 23:49:13 tbox Exp $ */
+/* $Id: heap.c,v 1.39.150.2 2011-03-03 23:47:09 tbox Exp $ */
/*! \file
* Heap implementation of priority queues adapted from the following:
@@ -86,8 +86,9 @@ isc_heap_create(isc_mem_t *mctx, isc_heapcompare_t compare,
if (heap == NULL)
return (ISC_R_NOMEMORY);
heap->magic = HEAP_MAGIC;
- heap->mctx = mctx;
heap->size = 0;
+ heap->mctx = NULL;
+ isc_mem_attach(mctx, &heap->mctx);
if (size_increment == 0)
heap->size_increment = SIZE_INCREMENT;
else
@@ -114,7 +115,7 @@ isc_heap_destroy(isc_heap_t **heapp) {
isc_mem_put(heap->mctx, heap->array,
heap->size * sizeof(void *));
heap->magic = 0;
- isc_mem_put(heap->mctx, heap, sizeof(*heap));
+ isc_mem_putanddetach(&heap->mctx, heap, sizeof(*heap));
*heapp = NULL;
}