Free caps, remove strdup

This commit is contained in:
James Booth
2014-09-24 01:06:49 +01:00
parent a288c200d7
commit 41f4621e6f
2 changed files with 4 additions and 1 deletions

View File

@@ -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");