From: Corey Kosak Date: Wed, 25 Nov 2015 21:54:30 +0000 (-0500) Subject: c_avl_pick needs to update the 'size' field of the tree when it deletes X-Git-Tag: collectd-5.5.1~48^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=007d96fe10beb6c6d4f20c79851404be18a3418f;p=collectd.git c_avl_pick needs to update the 'size' field of the tree when it deletes a node. Signed-off-by: Florian Forster --- diff --git a/src/utils_avltree.c b/src/utils_avltree.c index ecaf3c91..139d23ac 100644 --- a/src/utils_avltree.c +++ b/src/utils_avltree.c @@ -648,6 +648,7 @@ int c_avl_pick (c_avl_tree_t *t, void **key, void **value) *value = n->value; free_node (n); + --t->size; rebalance (t, p); return (0);