mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-03 09:32:02 +00:00
Fix an handle leak
This commit is contained in:
parent
9be61b5cd4
commit
e1c3b46ee2
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue