summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/lib/bind/isc/heap.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind9/lib/bind/isc/heap.c')
-rw-r--r--contrib/bind9/lib/bind/isc/heap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/bind9/lib/bind/isc/heap.c b/contrib/bind9/lib/bind/isc/heap.c
index f63619f..2faf6f5 100644
--- a/contrib/bind9/lib/bind/isc/heap.c
+++ b/contrib/bind9/lib/bind/isc/heap.c
@@ -26,7 +26,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: heap.c,v 1.1.206.1 2004/03/09 08:33:43 marka Exp $";
+static const char rcsid[] = "$Id: heap.c,v 1.1.206.2 2006/03/10 00:17:21 marka Exp $";
#endif /* not lint */
#include "port_before.h"
@@ -54,9 +54,13 @@ heap_new(heap_higher_priority_func higher_priority, heap_index_func index,
int array_size_increment) {
heap_context ctx;
+ if (higher_priority == NULL)
+ return (NULL);
+
ctx = (heap_context)malloc(sizeof (struct heap_context));
- if (ctx == NULL || higher_priority == NULL)
+ if (ctx == NULL)
return (NULL);
+
ctx->array_size = 0;
if (array_size_increment == 0)
ctx->array_size_increment = ARRAY_SIZE_INCREMENT;
OpenPOWER on IntegriCloud