mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Merge pull request #1292 from profanity-im/memleak-issue1279
Fix memory leak of presence object
This commit is contained in:
commit
89502ca199
@ -140,6 +140,8 @@ roster_update_presence(const char *const barejid, Resource *resource, GDateTime
|
|||||||
|
|
||||||
PContact contact = roster_get_contact(barejid);
|
PContact contact = roster_get_contact(barejid);
|
||||||
if (contact == NULL) {
|
if (contact == NULL) {
|
||||||
|
/* Don't lose resource when there is no owner. */
|
||||||
|
resource_destroy(resource);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (!_datetimes_equal(p_contact_last_activity(contact), last_activity)) {
|
if (!_datetimes_equal(p_contact_last_activity(contact), last_activity)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user