Fix multiple mem leaks, refactor and improve memory management #10
Reference in New Issue
Block a user
No description provided.
Delete Branch "ref/scrolling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
How to test the functionality
@@ -589,3 +589,2 @@chatwin_db_history(ProfChatWin* chatwin, const gchar* start_time, const gchar* end_time, gboolean flip){if (!end_time) {end_time = buffer_size(((ProfWin*)chatwin)->layout->buffer) == 0 ? NULL : g_date_time_format_iso8601(buffer_get_entry(((ProfWin*)chatwin)->layout->buffer, 0)->time);Mem leak fixed. Since
end_timebecame const, it's not freed within the method.auto_gchar gchar* _end_time is used as a temporary variable with autocleanup in case if
end_timeis not defined.@@ -716,3 +717,1 @@GDateTime* now = g_date_time_new_now_local();gchar* end_date = g_date_time_format_iso8601(now);g_date_time_unref(now);auto_gchar gchar* end_date = g_date_time_format_iso8601(now);Always free
end_datenow, sincechatwin_db_historystopped managing memory.@@ -2754,1 +2754,4 @@// Trim the last 3 characters from the datetime string to remove unwanted suffix (timezone offset)static void_truncate_datetime_suffix(gchar* str)Safe datetime truncation in case of malformed datetime
@@ -645,3 +645,3 @@int max_sessions = accounts_get_max_sessions(account_name);if (max_sessions > 0) {const gchar* cur_resource = accounts_get_resource(account_name);auto_gchar gchar* cur_resource = accounts_get_resource(account_name);Old mem leak fixed.
jabber.developer2 referenced this pull request2026-05-27 11:30:53 +00:00