gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r8907 - GNUnet/src/util/containers


From: gnunet
Subject: [GNUnet-SVN] r8907 - GNUnet/src/util/containers
Date: Mon, 31 Aug 2009 11:09:31 -0600

Author: nevans
Date: 2009-08-31 11:09:31 -0600 (Mon, 31 Aug 2009)
New Revision: 8907

Modified:
   GNUnet/src/util/containers/heap.c
Log:
empty heap check on delete

Modified: GNUnet/src/util/containers/heap.c
===================================================================
--- GNUnet/src/util/containers/heap.c   2009-08-31 17:08:33 UTC (rev 8906)
+++ GNUnet/src/util/containers/heap.c   2009-08-31 17:09:31 UTC (rev 8907)
@@ -419,6 +419,9 @@
   ret = root_node->element;
   last = getPos (root, root->size);
 
+  if ((root->size == 0) || (root_node == NULL))
+    return NULL;
+
   if ((root_node == last) && (root->size == 1)) /* We are removing the last 
node in the heap! */
     {
       root->root = NULL;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]