summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acinclude.m45
1 files changed, 4 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 234dcd7ef8..36bd1c22e5 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1376,8 +1376,11 @@ main() {
dir = opendir("/");
if (!dir)
exit(1);
- if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
+ if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) {
+ close(dir);
exit(0);
+ }
+ close(dir);
exit(1);
}
],[