Files
Florian Märkl 26362e8c18 Fix sdb memory usage in RzBinFile/RzBinObject (Fix #6688) (#6691)
This fixes several interdependent issues, originally surfaced as leaked
memory by xzy test cases:

- Fixed double-free of sub-namespaced sdbs in ns_free_exc_list and added
  a test for this case. Refcounting should correctly account for the
  amount of times an sdb is referenced as a sub-namespace.

This caused even more leaks, whose causes are now localized downstream:

- bf->sdb->refs++; in rz_bin_object_new() appears to have only been a
  workaround for the actual issue mentioned above.
- RzBinObject.kv also depended on it, but actually it is supposed to
  only be an additional reference to an sdb managed by the plugin, so we
  adjust the code accordingly.

Finally, test_rz_bin_reloc_storage also had an independent leak fixed
here to make the entire test file leak-free.
2026-08-29 09:24:13 +02:00
..