Fix leaked file descriptor
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
This commit is contained in:
parent
08d5e19e6e
commit
030a3b08bf
1 changed files with 1 additions and 0 deletions
|
|
@ -291,6 +291,7 @@ int Swig_insert_file(const_String_or_char_ptr filename, File *outfile) {
|
||||||
while ((nbytes = Read(f, buffer, 4096)) > 0) {
|
while ((nbytes = Read(f, buffer, 4096)) > 0) {
|
||||||
Write(outfile, buffer, nbytes);
|
Write(outfile, buffer, nbytes);
|
||||||
}
|
}
|
||||||
|
fclose(f);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue