From: Gonzalo A. <ga...@us...> - 2006-10-31 12:23:37
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9712/src Modified Files: DiskSessionDriver.cpp Log Message: * Fixed possible dirhandle leak. Index: DiskSessionDriver.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/DiskSessionDriver.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DiskSessionDriver.cpp 12 Oct 2006 21:10:36 -0000 1.7 --- DiskSessionDriver.cpp 31 Oct 2006 12:23:30 -0000 1.8 *************** *** 85,90 **** string path = spool + " " + de->d_name; struct stat st; ! if (stat(path.c_str(), &st) < 0) return false; if (!S_ISREG(st.st_mode)) continue; --- 85,92 ---- string path = spool + " " + de->d_name; struct stat st; ! if (stat(path.c_str(), &st) < 0) { ! closedir(dh); return false; + } if (!S_ISREG(st.st_mode)) continue; |