diff --git a/main/file.c b/main/file.c index 2f1789481a..a9b36e7f5d 100644 --- a/main/file.c +++ b/main/file.c @@ -916,6 +916,7 @@ struct ast_filestream *ast_readfile(const char *filename, const char *type, cons ast_log(LOG_WARNING, "Unable to open %s\n", fn); if (fs) ast_free(fs); + fs = NULL; if (bfile) fclose(bfile); ast_free(fn);