1
1
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:
Michael Vetter 2019-07-22 14:47:45 +02:00
parent 41267ae1c5
commit 46ddf2c2f4

View File

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