Merge pull request #1150 from paulfariello/hotfix/omemo-memleaks
Hotfix/omemo memleaks Regards https://github.com/profanity-im/profanity/issues/1131
This commit is contained in:
@@ -290,6 +290,7 @@ connection_send_stanza(const char *const stanza)
|
||||
gboolean
|
||||
connection_supports(const char *const feature)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GList *jids = g_hash_table_get_keys(conn.features_by_jid);
|
||||
|
||||
GList *curr = jids;
|
||||
@@ -297,7 +298,8 @@ connection_supports(const char *const feature)
|
||||
char *jid = curr->data;
|
||||
GHashTable *features = g_hash_table_lookup(conn.features_by_jid, jid);
|
||||
if (features && g_hash_table_lookup(features, feature)) {
|
||||
return TRUE;
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
curr = g_list_next(curr);
|
||||
@@ -305,7 +307,7 @@ connection_supports(const char *const feature)
|
||||
|
||||
g_list_free(jids);
|
||||
|
||||
return FALSE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
char*
|
||||
|
||||
@@ -1869,6 +1869,15 @@ stanza_attach_publish_options(xmpp_ctx_t *const ctx, xmpp_stanza_t *const iq, co
|
||||
|
||||
xmpp_stanza_t *pubsub = xmpp_stanza_get_child_by_ns(iq, STANZA_NS_PUBSUB);
|
||||
xmpp_stanza_add_child(pubsub, publish_options);
|
||||
|
||||
xmpp_stanza_release(access_model_value_text);
|
||||
xmpp_stanza_release(access_model_value);
|
||||
xmpp_stanza_release(access_model);
|
||||
xmpp_stanza_release(form_type_value_text);
|
||||
xmpp_stanza_release(form_type_value);
|
||||
xmpp_stanza_release(form_type);
|
||||
xmpp_stanza_release(x);
|
||||
xmpp_stanza_release(publish_options);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user