diff --git a/main/logger.c b/main/logger.c index fac68d9b6b..13f6de8902 100644 --- a/main/logger.c +++ b/main/logger.c @@ -601,7 +601,7 @@ static int init_logger_chain(const char *altconf) /* If no config file, we're fine, set default options. */ if (!cfg) { - if (!(chan = ast_calloc(1, sizeof(*chan)))) { + if (!(chan = ast_calloc(1, sizeof(*chan) + 1))) { fprintf(stderr, "Failed to initialize default logging\n"); return -1; }