mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-23 05:26:22 +00:00
Fix a bunch of obvious memory leaks at termination
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
@@ -167,6 +167,8 @@ void
|
||||
connection_shutdown(void)
|
||||
{
|
||||
connection_clear_data();
|
||||
g_hash_table_destroy(conn.requested_features);
|
||||
g_hash_table_destroy(conn.available_resources);
|
||||
if (conn.xmpp_conn) {
|
||||
xmpp_conn_release(conn.xmpp_conn);
|
||||
conn.xmpp_conn = NULL;
|
||||
|
||||
@@ -83,6 +83,12 @@ presence_sub_requests_init(void)
|
||||
sub_requests_ac = autocomplete_new();
|
||||
}
|
||||
|
||||
void
|
||||
presence_sub_requests_destroy(void)
|
||||
{
|
||||
autocomplete_free(sub_requests_ac);
|
||||
}
|
||||
|
||||
void
|
||||
presence_handlers_init(void)
|
||||
{
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
void presence_handlers_init(void);
|
||||
void presence_sub_requests_init(void);
|
||||
void presence_sub_requests_destroy(void);
|
||||
void presence_clear_sub_requests(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -233,7 +233,7 @@ session_shutdown(void)
|
||||
_session_free_internals();
|
||||
|
||||
chat_sessions_clear();
|
||||
presence_clear_sub_requests();
|
||||
presence_sub_requests_destroy();
|
||||
|
||||
connection_shutdown();
|
||||
if (saved_status) {
|
||||
|
||||
Reference in New Issue
Block a user