mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Fix memleak in _handle_groupchat()
We need to unref the timestamp before setting a new one.
This commit is contained in:
parent
240aeac4d3
commit
e9c5c1979d
@ -872,7 +872,12 @@ _handle_groupchat(xmpp_stanza_t *const stanza)
|
||||
message->timestamp = stanza_get_delay_from(stanza, jid->domainpart);
|
||||
}
|
||||
|
||||
bool is_muc_history = message->timestamp != NULL;
|
||||
bool is_muc_history;
|
||||
if (message->timestamp != NULL) {
|
||||
is_muc_history = TRUE;
|
||||
g_date_time_unref(message->timestamp);
|
||||
message->timestamp = NULL;
|
||||
}
|
||||
|
||||
// we want to display the oldest delay
|
||||
message->timestamp = stanza_get_oldest_delay(stanza);
|
||||
|
Loading…
Reference in New Issue
Block a user