Fixed munmap bug.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@1055 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2001-03-16 04:38:48 +00:00
commit 6bf5b348d1

View file

@ -121,6 +121,8 @@ char *wad_load_source(char *path, int line) {
if (strcmp(src_path,path)) {
if (src_file) {
munmap(src_file, src_len);
src_file = 0;
src_len = 0;
}
fd = open(path, O_RDONLY);
if (fd < 0) return 0;