diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-07-22 14:47:45 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2019-07-22 14:47:45 +0200 |
commit | 46ddf2c2f4aaf1390b0924d880a2e7439509cf0b (patch) | |
tree | e5e5416997b5b72eac83d6f3e40ebd92dbe041cb | |
parent | 41267ae1c506310ff2f402ed0fefe98f91af8b59 (diff) | |
download | profani-tty-46ddf2c2f4aaf1390b0924d880a2e7439509cf0b.tar.gz |
Fix memleak in roster_remove
strdup() is not needed here but will actually lead to a memleak.
-rw-r--r-- | src/xmpp/roster_list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmpp/roster_list.c b/src/xmpp/roster_list.c index 4df7d865..4c4f4108 100644 --- a/src/xmpp/roster_list.c +++ b/src/xmpp/roster_list.c @@ -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); |