When a node is removed from a splay tree, the splay tree was not using the function splay_tree_delete_key_fn to release the key. This was causing a leak, fixed by Tom Tromey. This patch fixes another key leak, that happens when a key equal to a key already present is inserted. In such a case, we have to release the old KEY. Note that this is based on the assumption that the caller always allocates a new KEY when doing an insert. Also, clarify the documentation about when the release functions are called. 2019-02-11 Philippe Waroquiers <philippe.waroquiers@skynet.be> * splay-tree.h (splay_tree_delete_key_fn): Update comment. (splay_tree_delete_value_fn): Likewise. libiberty/ChangeLog 2019-02-11 Philippe Waroquiers <philippe.waroquiers@skynet.be> * splay-tree.c (splay_tree_insert): Also release old KEY in case of insertion of a key equal to an already present key. (splay_tree_new_typed_alloc): Update comment. From-SVN: r268793
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| gdb | Loading commit data... | |
| COPYING | Loading commit data... | |
| COPYING3 | Loading commit data... | |
| ChangeLog | Loading commit data... | |
| ChangeLog-9103 | Loading commit data... | |
| ChangeLog.jit | Loading commit data... | |
| ansidecl.h | Loading commit data... | |
| demangle.h | Loading commit data... | |
| dwarf2.def | Loading commit data... | |
| dwarf2.h | Loading commit data... | |
| dyn-string.h | Loading commit data... | |
| environ.h | Loading commit data... | |
| fibheap.h | Loading commit data... | |
| filenames.h | Loading commit data... | |
| floatformat.h | Loading commit data... | |
| fnmatch.h | Loading commit data... | |
| gcc-c-fe.def | Loading commit data... | |
| gcc-c-interface.h | Loading commit data... | |
| gcc-cp-fe.def | Loading commit data... | |
| gcc-cp-interface.h | Loading commit data... | |
| gcc-interface.h | Loading commit data... | |
| getopt.h | Loading commit data... | |
| gomp-constants.h | Loading commit data... | |
| hashtab.h | Loading commit data... | |
| hsa.h | Loading commit data... | |
| leb128.h | Loading commit data... | |
| libiberty.h | Loading commit data... | |
| longlong.h | Loading commit data... | |
| lto-symtab.h | Loading commit data... | |
| md5.h | Loading commit data... | |
| objalloc.h | Loading commit data... | |
| obstack.h | Loading commit data... | |
| partition.h | Loading commit data... | |
| plugin-api.h | Loading commit data... | |
| safe-ctype.h | Loading commit data... | |
| sha1.h | Loading commit data... | |
| simple-object.h | Loading commit data... | |
| sort.h | Loading commit data... | |
| splay-tree.h | Loading commit data... | |
| symcat.h | Loading commit data... | |
| timeval-utils.h | Loading commit data... | |
| unique-ptr.h | Loading commit data... | |
| vtv-change-permission.h | Loading commit data... | |
| xregex.h | Loading commit data... | |
| xregex2.h | Loading commit data... | |
| xtensa-config.h | Loading commit data... |