Use reference counts for GDateTimes #516

This commit is contained in:
James Booth
2015-06-30 16:11:39 +01:00
parent dd206ef637
commit d5f79c7b35
3 changed files with 7 additions and 2 deletions

View File

@@ -995,6 +995,7 @@ stanza_get_delay(xmpp_stanza_t * const stanza)
if (stamp && (g_time_val_from_iso8601(stamp, &utc_stamp))) {
GDateTime *utc_datetime = g_date_time_new_from_timeval_utc(&utc_stamp);
GDateTime *local_datetime = g_date_time_to_local(utc_datetime);
g_date_time_unref(utc_datetime);
return local_datetime;
}
}
@@ -1010,6 +1011,7 @@ stanza_get_delay(xmpp_stanza_t * const stanza)
if (stamp && (g_time_val_from_iso8601(stamp, &utc_stamp))) {
GDateTime *utc_datetime = g_date_time_new_from_timeval_utc(&utc_stamp);
GDateTime *local_datetime = g_date_time_to_local(utc_datetime);
g_date_time_unref(utc_datetime);
return local_datetime;
}
}