Skip to content

Commit

Permalink
gcc: ensure all fmt struct element are initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
Zdenek Kabelac committed Jun 19, 2024
1 parent f8907b8 commit a98beb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/format_text/format-text.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a98beb8

Please sign in to comment.