diff --git a/main/logger.c b/main/logger.c index fb9e8ed4fc..46d9cbb571 100644 --- a/main/logger.c +++ b/main/logger.c @@ -464,7 +464,7 @@ static int init_logger_chain(int locked, 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; }