@@ -60,6 +60,7 @@ legacy_load_clients_from_recdir(int *num_records)
}
if (read(fd, recdirname, PATH_MAX) < 0) {
xlog(D_GENERAL, "Unable to read from %s: %m", NFSD_RECDIR_FILE);
+ close(fd);
return;
}
close(fd);
@@ -135,6 +136,7 @@ legacy_clear_recdir(void)
}
if (read(fd, recdirname, PATH_MAX) < 0) {
xlog(D_GENERAL, "Unable to read from %s: %m", NFSD_RECDIR_FILE);
+ close(fd);
return;
}
close(fd);
@@ -331,6 +331,7 @@ cld_check_grace_period(void)
if (read(fd, &c, 1) < 0) {
xlog(L_WARNING, "Unable to read from %s: %m",
NFSD_END_GRACE_FILE);
+ close(fd);
return 1;
}
close(fd);
@@ -380,7 +380,7 @@ sqlite_maindb_init_v4(void)
&err);
if (ret != SQLITE_OK) {
xlog(L_ERROR, "Unable to begin transaction: %s", err);
- return ret;
+ goto out;
}
/*
Signed-off-by: Scott Mayhew <smayhew@redhat.com> --- utils/nfsdcld/legacy.c | 2 ++ utils/nfsdcld/nfsdcld.c | 1 + utils/nfsdcld/sqlite.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-)