From a98beb8ee36982ecaa363c92c3f8b3984d655c0b Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 13 Jun 2024 23:05:46 +0200 Subject: [PATCH] gcc: ensure all fmt struct element are initialized --- lib/format_text/format-text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index e8bab535e..559c529e5 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -2593,7 +2593,7 @@ struct format_type *create_text_format(struct cmd_context *cmd) struct format_type *fmt; struct mda_lists *mda_lists; - if (!(fmt = malloc(sizeof(*fmt)))) { + if (!(fmt = zalloc(sizeof(*fmt)))) { log_error("Failed to allocate text format type structure."); return NULL; }