diff --git a/ChangeLog b/ChangeLog index 9eb85b256..6b7efad1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ +2009-08-13 m. allan noah + * tools/sane-desc.c: add closedir call to fix bug #311880, patch + from Johannes Meixner + 2009-08-08 Julien Blache - - frontend/saned.c: run_standalone(), explicitely check for errors + * frontend/saned.c: run_standalone(), explicitely check for errors on fds. 2009-08-07 m. allan noah diff --git a/tools/sane-desc.c b/tools/sane-desc.c index 340229de6..16622dc55 100644 --- a/tools/sane-desc.c +++ b/tools/sane-desc.c @@ -1523,6 +1523,12 @@ read_files (void) fclose (fp); } /* if (strlen) */ } /* while (direntry) */ + if (closedir(dir) != 0) + { + DBG_ERR ("cannot close directory `%s' (%s)\n", search_dir, + strerror (errno)); + return SANE_FALSE; + } if (end) search_dir = end + 1; else