Using cargo-valgrind on a project using wirefilter shows a memory leak using Scheme::add_function.
Valgrind output is:
Error leaked 2.3 kiB in 1 block
Info at malloc
at alloc::alloc::alloc (alloc.rs:86)
at hashbrown::raw::inner::RawTable<T>::new_uninitialized (mod.rs:411)
at hashbrown::raw::inner::RawTable<T>::fallible_with_capacity (mod.rs:440)
at hashbrown::raw::inner::RawTable<T>::resize (mod.rs:897)
at hashbrown::raw::inner::RawTable<T>::reserve_rehash (mod.rs:778)
at hashbrown::raw::inner::RawTable<T>::reserve (mod.rs:731)
at hashbrown::raw::inner::RawTable<T>::insert (mod.rs:950)
at indexmap::map::core::IndexMapCore<K,V>::push (core.rs:214)
at indexmap::map::core::VacantEntry<K,V>::insert (core.rs:630)
at wirefilter::scheme::Scheme::add_function (scheme.rs:579)
Using cargo-valgrind on a project using wirefilter shows a memory leak using
Scheme::add_function
.Valgrind output is:
The exact line that seems to cause the leak is: https://github.com/cloudflare/wirefilter/blob/2334ab150abd803a555b1541a7e44891b7f5cc60/engine/src/scheme.rs#L579