When loading audio files into memory for the prompt collection, the file
descriptor is not closed.
The file description may be closed after mmap().
--- /dev/fd/63 2015-02-20 11:31:34.822210926 -0500
+++ core/AmCachedAudioFile.cpp 2015-02-20 09:28:26.000000000 -0500
@@ -65,6 +65,7 @@
if (fstat(fd, &sbuf) == -1) {
ERROR("cannot stat file '%s'.\n",
name.c_str());
+ close(fd);
return -2;
}
@@ -72,10 +73,12 @@
fd, 0)) == (caddr_t)(-1)) {
ERROR("cannot mmap file '%s'.\n",
name.c_str());
+ close(fd);
return -3;
}
data_size = sbuf.st_size;
+ close(fd);
return 0;
}
Kind Regards,
Joseph Stusick
Manager - Product Development
Appia Communications, Inc.
231.929.0970 x186 | cell 231.883.5454 (EST)
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev