

In jfsck() I forgot to close three files (well, two and a directory really);
this patch closes them.

Thanks to Pieter Grimmerink for reporting.



---

 cur-root/libjio.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN libjio.c~jfsck_close libjio.c
--- cur/libjio.c~jfsck_close	2004-05-05 15:08:12.000000000 -0300
+++ cur-root/libjio.c	2004-05-05 15:08:12.000000000 -0300
@@ -732,6 +732,7 @@ int jfsck(char *name, struct jfsck_resul
 		if (rv > maxtid)
 			maxtid = rv;
 	}
+	closedir(dir);
 
 	/* we loop all the way up to the max transaction id */
 	for (i = 1; i <= maxtid; i++) {
@@ -860,6 +861,9 @@ loop:
 		res->total++;
 	}
 
+	close(fs.fd);
+	close(fs.jfd);
+
 	return 0;
 
 }

_
