diff options
author | Michael Vetter <jubalh@iodoru.org> | 2022-06-29 09:42:54 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2022-06-29 09:42:54 +0200 |
commit | dfc51f7ba4bf8918eec7d3404246f80004c6aedc (patch) | |
tree | 2eb538af341fcd24a1f37ef19d4aee88f7b3545b /src | |
parent | 412a0a573714c11188cd4a59d871509f8eebbf86 (diff) | |
download | profani-tty-dfc51f7ba4bf8918eec7d3404246f80004c6aedc.tar.gz |
database: unref date
Diffstat (limited to 'src')
-rw-r--r-- | src/database.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c index 0ccd422a..b6497e09 100644 --- a/src/database.c +++ b/src/database.c @@ -301,7 +301,9 @@ _add_to_db(ProfMessage* message, char* type, const Jid* const from_jid, const Ji if (message->timestamp) { date_fmt = g_date_time_format_iso8601(message->timestamp); } else { - date_fmt = g_date_time_format_iso8601(g_date_time_new_now_local()); + GDateTime* dt = g_date_time_new_now_local(); + date_fmt = g_date_time_format_iso8601(dt); + g_date_time_unref(dt); } const char* enc = _get_message_enc_str(message->enc); |