Merge pull request #1292 from profanity-im/memleak-issue1279

Fix memory leak of presence object
This commit is contained in:
Michael Vetter
2020-03-29 21:57:57 +02:00
committed by GitHub

View File

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