From 35030b7a7e4cfd3f95b7e4f7dc9d748cf0c06632 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 27 Feb 2026 21:27:04 +0100 Subject: [PATCH] cleanup: use g_new0 instead of malloc in buffer_get_entry_by_id() --- src/ui/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/buffer.c b/src/ui/buffer.c index 1223d520..f95da438 100644 --- a/src/ui/buffer.c +++ b/src/ui/buffer.c @@ -192,7 +192,7 @@ buffer_get_entry_by_id(ProfBuff buffer, const char* const id) static ProfBuffEntry* _create_entry(const char* show_char, int pad_indent, GDateTime* time, int flags, theme_item_t theme_item, const char* const display_from, const char* const from_jid, const char* const message, DeliveryReceipt* receipt, const char* const id, int y_start_pos, int y_end_pos) { - ProfBuffEntry* e = malloc(sizeof(struct prof_buff_entry_t)); + ProfBuffEntry* e = g_new0(ProfBuffEntry, 1); e->show_char = STRDUP_OR_NULL(show_char); e->pad_indent = pad_indent; e->flags = flags;