From c10c47343ee254c6cff7100c372c79321ce3e5f8 Mon Sep 17 00:00:00 2001 From: V2 <60795188+ZeroMemoryEx@users.noreply.github.com> Date: Mon, 4 Jul 2022 16:31:32 +0100 Subject: [PATCH] Update configfile.c --- src/configfile.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/configfile.c b/src/configfile.c index 4acd4e9..352169d 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -320,6 +320,11 @@ void config_file_parse(void) int ret; c = malloc(sizeof(struct config_t)); + if (!c) + { + fprintf(stderr, "Error: Insufficient memory allocation"); + exit(EXIT_FAILURE); + } memset(c, 0, sizeof(struct config_t)); // Find config file