diff --git a/main/file.c b/main/file.c index cfa5bf3304..65bf0dbe3b 100644 --- a/main/file.c +++ b/main/file.c @@ -468,7 +468,7 @@ static int ast_filehelper(const char *filename, const void *arg2, const char *fm if (open_wrapper(s)) { fclose(bfile); free(fn); - free(s); + ast_closestream(s); continue; /* cannot run open on file */ } /* ok this is good for OPEN */