summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mandocdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 2e58d1db..a8057716 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1168,10 +1168,9 @@ pman_node(MAN_ARGS)
}
}
- if (pman_node(hash, buf, dbuf, n->child))
- return(1);
- if (pman_node(hash, buf, dbuf, n->next))
- return(1);
+ for (n = n->child; n; n = n->next)
+ if (pman_node(hash, buf, dbuf, n))
+ return(1);
return(0);
}
@@ -1276,6 +1275,7 @@ ofile_dirbuild(const char *dir, int verb, struct of **of)
}
}
+ closedir(d);
return(1);
}