Memory leak due to theme reinitiation #4
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Commit
6034b833beintroduced a call totheme_init(theme)after entering the PGP key password. However, this introduces two issues:The function
theme_init(const char* const theme_name)includes the following line:Because there is no check for an existing
defaultstable, any previously allocated hash table is silently overwritten. If_theme_close()is not called beforehand, this results in a memory leak.This behavior is problematic, as it makes it easy to introduce memory leaks simply by invoking
theme_init()repeatedly without proper cleanup.Recommended Fix
theme_init().theme_init()call fromsv_ev_roster_received, as it appears unnecessary for this code path and contributes to inefficiency and resource leaks.jabber.developer2 referenced this issue2026-05-27 13:23:47 +00:00