mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Free caps, remove strdup
This commit is contained in:
parent
a288c200d7
commit
41f4621e6f
@ -110,7 +110,7 @@ caps_add(const char * const ver, Capabilities *caps)
|
||||
const gchar* features_list[num];
|
||||
int curr = 0;
|
||||
while (curr_feature) {
|
||||
features_list[curr++] = strdup(curr_feature->data);
|
||||
features_list[curr++] = curr_feature->data;
|
||||
curr_feature = g_slist_next(curr_feature);
|
||||
}
|
||||
g_key_file_set_string_list(cache, ver, "features", features_list, num);
|
||||
@ -426,6 +426,8 @@ caps_create(xmpp_stanza_t *query)
|
||||
}
|
||||
}
|
||||
|
||||
g_slist_free(identity_stanzas);
|
||||
|
||||
if (found) {
|
||||
category = xmpp_stanza_get_attribute(found, "category");
|
||||
type = xmpp_stanza_get_attribute(found, "type");
|
||||
|
@ -392,6 +392,7 @@ _caps_response_handler(xmpp_conn_t *const conn, xmpp_stanza_t * const stanza,
|
||||
log_info("Capabilities not cached: %s, storing", given_sha1);
|
||||
Capabilities *capabilities = caps_create(query);
|
||||
caps_add(given_sha1, capabilities);
|
||||
caps_destroy(capabilities);
|
||||
}
|
||||
|
||||
caps_map(from, given_sha1);
|
||||
|
Loading…
Reference in New Issue
Block a user