diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-03-29 21:57:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-29 21:57:57 +0200 |
commit | 89502ca199de777039423e7f636bc944e558946e (patch) | |
tree | 809441239d5d4ee77f502c4b1d44dfef3dd7a438 /src | |
parent | c520c3d3c39e079bb6370f5490fa8d24c865feca (diff) | |
parent | 6c649a9de80589d51bc267874997c1cf1df0f48b (diff) | |
download | profani-tty-89502ca199de777039423e7f636bc944e558946e.tar.gz |
Merge pull request #1292 from profanity-im/memleak-issue1279
Fix memory leak of presence object
Diffstat (limited to 'src')
-rw-r--r-- | src/xmpp/roster_list.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xmpp/roster_list.c b/src/xmpp/roster_list.c index 3dadb884..49f067d6 100644 --- a/src/xmpp/roster_list.c +++ b/src/xmpp/roster_list.c @@ -140,6 +140,8 @@ roster_update_presence(const char *const barejid, Resource *resource, GDateTime PContact contact = roster_get_contact(barejid); if (contact == NULL) { + /* Don't lose resource when there is no owner. */ + resource_destroy(resource); return FALSE; } if (!_datetimes_equal(p_contact_last_activity(contact), last_activity)) { |