aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog4
-rw-r--r--libiberty/splay-tree.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 436fb96..496d76d 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,7 @@
+2019-01-21 Tom Tromey <tom@tromey.com>
+
+ * splay-tree.c (splay_tree_remove): Delete the key if necessary.
+
2019-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
diff --git a/libiberty/splay-tree.c b/libiberty/splay-tree.c
index 920e68d..21d23c3 100644
--- a/libiberty/splay-tree.c
+++ b/libiberty/splay-tree.c
@@ -425,6 +425,8 @@ splay_tree_remove (splay_tree sp, splay_tree_key key)
right = sp->root->right;
/* Delete the root node itself. */
+ if (sp->delete_key)
+ (*sp->delete_key) (sp->root->key);
if (sp->delete_value)
(*sp->delete_value) (sp->root->value);
(*sp->deallocate) (sp->root, sp->allocate_data);