mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Fix memleak in roster_remove
strdup() is not needed here but will actually lead to a memleak.
This commit is contained in:
parent
41267ae1c5
commit
46ddf2c2f4
@ -260,7 +260,7 @@ roster_remove(const char *const name, const char *const barejid)
|
||||
if (contact) {
|
||||
GList *resources = p_contact_get_available_resources(contact);
|
||||
while (resources) {
|
||||
GString *fulljid = g_string_new(strdup(barejid));
|
||||
GString *fulljid = g_string_new(barejid);
|
||||
g_string_append(fulljid, "/");
|
||||
g_string_append(fulljid, resources->data);
|
||||
autocomplete_remove(roster->fulljid_ac, fulljid->str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user