mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-19 06:16:21 +00:00
Fix memleak in _handle_groupchat()
We need to unref the timestamp before setting a new one.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user