Some minor changes

* Fix some linter suggestions.
* Change some defines to `const` vars.
* Free buffer entries in the reverse order they were allocated.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
Steffen Jaeckel
2025-01-08 11:53:09 +01:00
parent 8151dfa3b4
commit f27fa98717
2 changed files with 9 additions and 11 deletions

View File

@@ -213,12 +213,12 @@ _create_entry(const char* show_char, int pad_indent, GDateTime* time, int flags,
static void
_free_entry(ProfBuffEntry* entry)
{
free(entry->show_char);
free(entry->message);
free(entry->display_from);
free(entry->from_jid);
free(entry->id);
free(entry->receipt);
free(entry->message);
free(entry->from_jid);
free(entry->display_from);
g_date_time_unref(entry->time);
free(entry->show_char);
free(entry->receipt);
free(entry);
}