diff --git a/src/bindings/fluid_cmd.c b/src/bindings/fluid_cmd.c index 5f8241db..ccec3bfe 100644 --- a/src/bindings/fluid_cmd.c +++ b/src/bindings/fluid_cmd.c @@ -387,6 +387,7 @@ fluid_source(fluid_cmd_handler_t* handler, const char *filename) { int file; fluid_shell_t shell; + int result; #ifdef WIN32 file = _open(filename, _O_RDONLY); @@ -397,7 +398,11 @@ fluid_source(fluid_cmd_handler_t* handler, const char *filename) return file; } fluid_shell_init(&shell, NULL, handler, file, fluid_get_stdout()); - return fluid_shell_run(&shell); + result = fluid_shell_run(&shell); + + close(file); + + return result; } /**