This is the mail archive of the
mailing list for the GDB project.
[binutils-gdb] Fix leak in splay-tree
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Mon, 21 Jan 2019 11:36:43 -0500
- Subject: [binutils-gdb] Fix leak in splay-tree
*** TEST RESULTS FOR COMMIT d7167c671da0323daf31a8e07945c57c25f858d2 ***
Author: Tom Tromey <firstname.lastname@example.org>
Fix leak in splay-tree
Philippe Waroquiers noticed a memory leak in gdb, which he tracked
down to a bug in splay-tree. splay_tree_remove does not call the
`delete_key' function when it removes the old node; but it should.
I looked at every splay tree in GCC and there is only one that passes
a non-NULL delete function -- the one in lto.c. That file does not
call splay_tree_remove. So, I think this is safe to check in.
I re-ran the LTO tests to double check.
* splay-tree.c (splay_tree_remove): Delete the key if necessary.