diff --git a/main/file.c b/main/file.c index b4fac2e8c2..df7eb1f1e3 100644 --- a/main/file.c +++ b/main/file.c @@ -448,7 +448,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 */ } /* ok this is good for OPEN */