mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Fixed leaks in /affiliation and /role
This commit is contained in:
parent
c4412fe823
commit
c4ab9405f6
3
TODO_045
3
TODO_045
@ -1,9 +1,8 @@
|
||||
Test with valgrind using new commands
|
||||
/affiliation
|
||||
/role
|
||||
/occupants
|
||||
/privileges
|
||||
/ping
|
||||
fix muc roster leak
|
||||
|
||||
Update website help
|
||||
|
||||
|
@ -2074,10 +2074,13 @@ _bookmark_autocomplete(char *input, int *size)
|
||||
}
|
||||
g_string_free(beginning, TRUE);
|
||||
if (found != NULL) {
|
||||
g_strfreev(args);
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
||||
g_strfreev(args);
|
||||
|
||||
found = autocomplete_param_with_func(input, size, "/bookmark remove", bookmark_find);
|
||||
if (found != NULL) {
|
||||
return found;
|
||||
@ -2248,10 +2251,13 @@ _otr_autocomplete(char *input, int *size)
|
||||
found = autocomplete_param_with_func(input, size, beginning->str, roster_find_contact);
|
||||
g_string_free(beginning, TRUE);
|
||||
if (found != NULL) {
|
||||
g_strfreev(args);
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
||||
g_strfreev(args);
|
||||
|
||||
found = autocomplete_param_with_ac(input, size, "/otr policy", otr_policy_ac, TRUE);
|
||||
if (found != NULL) {
|
||||
return found;
|
||||
@ -2461,10 +2467,13 @@ _affiliation_autocomplete(char *input, int *size)
|
||||
result = autocomplete_param_with_ac(input, size, beginning->str, jid_ac, TRUE);
|
||||
g_string_free(beginning, TRUE);
|
||||
if (result != NULL) {
|
||||
g_strfreev(args);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
g_strfreev(args);
|
||||
|
||||
result = autocomplete_param_with_ac(input, size, "/affiliation set", affiliation_ac, TRUE);
|
||||
if (result != NULL) {
|
||||
return result;
|
||||
@ -2503,10 +2512,13 @@ _role_autocomplete(char *input, int *size)
|
||||
result = autocomplete_param_with_ac(input, size, beginning->str, nick_ac, TRUE);
|
||||
g_string_free(beginning, TRUE);
|
||||
if (result != NULL) {
|
||||
g_strfreev(args);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
g_strfreev(args);
|
||||
|
||||
result = autocomplete_param_with_ac(input, size, "/role set", role_ac, TRUE);
|
||||
if (result != NULL) {
|
||||
return result;
|
||||
@ -2592,10 +2604,13 @@ _connect_autocomplete(char *input, int *size)
|
||||
found = autocomplete_param_with_ac(input, size, beginning->str, connect_property_ac, TRUE);
|
||||
g_string_free(beginning, TRUE);
|
||||
if (found != NULL) {
|
||||
g_strfreev(args);
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
||||
g_strfreev(args);
|
||||
|
||||
found = autocomplete_param_with_func(input, size, "/connect", accounts_find_enabled);
|
||||
if (found != NULL) {
|
||||
return found;
|
||||
@ -2631,10 +2646,13 @@ _join_autocomplete(char *input, int *size)
|
||||
found = autocomplete_param_with_ac(input, size, beginning->str, join_property_ac, TRUE);
|
||||
g_string_free(beginning, TRUE);
|
||||
if (found != NULL) {
|
||||
g_strfreev(args);
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
||||
g_strfreev(args);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -2656,12 +2674,14 @@ _account_autocomplete(char *input, int *size)
|
||||
found = autocomplete_param_with_ac(input, size, beginning->str, otr_policy_ac, TRUE);
|
||||
g_string_free(beginning, TRUE);
|
||||
if (found != NULL) {
|
||||
g_strfreev(args);
|
||||
return found;
|
||||
}
|
||||
} else {
|
||||
found = autocomplete_param_with_ac(input, size, beginning->str, account_set_ac, TRUE);
|
||||
g_string_free(beginning, TRUE);
|
||||
if (found != NULL) {
|
||||
g_strfreev(args);
|
||||
return found;
|
||||
}
|
||||
}
|
||||
@ -2673,6 +2693,7 @@ _account_autocomplete(char *input, int *size)
|
||||
found = autocomplete_param_with_ac(input, size, beginning->str, account_clear_ac, TRUE);
|
||||
g_string_free(beginning, TRUE);
|
||||
if (found != NULL) {
|
||||
g_strfreev(args);
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
@ -974,6 +974,7 @@ _room_affiliation_list_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t *
|
||||
|
||||
handle_room_affiliation_list(from, affiliation, jids);
|
||||
free(affiliation);
|
||||
g_slist_free(jids);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1019,6 +1020,7 @@ _room_role_list_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const s
|
||||
|
||||
handle_room_role_list(from, role, nicks);
|
||||
free(role);
|
||||
g_slist_free(nicks);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user