diff --git a/main/file.c b/main/file.c index 22a575556a..5663d6a8ba 100644 --- a/main/file.c +++ b/main/file.c @@ -450,7 +450,7 @@ static int ast_filehelper(const char *filename, const void *arg2, const char *fm if (open_wrapper(s)) { fclose(bfile); ast_free(fn); - ast_free(s); + ast_closestream(s); continue; /* cannot run open on file */ } if (st.st_size == 0) {