Update configfile.c

This commit is contained in:
V2 2022-07-04 16:31:32 +01:00 committed by GitHub
parent daa8cd39f3
commit c10c47343e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -320,6 +320,11 @@ void config_file_parse(void)
int ret; int ret;
c = malloc(sizeof(struct config_t)); c = malloc(sizeof(struct config_t));
if (!c)
{
fprintf(stderr, "Error: Insufficient memory allocation");
exit(EXIT_FAILURE);
}
memset(c, 0, sizeof(struct config_t)); memset(c, 0, sizeof(struct config_t));
// Find config file // Find config file