Fix leaked file descriptor

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
This commit is contained in:
Amarnath Valluri 2016-06-16 15:53:22 +03:00
commit 030a3b08bf

View file

@ -291,6 +291,7 @@ int Swig_insert_file(const_String_or_char_ptr filename, File *outfile) {
while ((nbytes = Read(f, buffer, 4096)) > 0) {
Write(outfile, buffer, nbytes);
}
fclose(f);
return 0;
}