summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_afs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/utils/net_afs.c b/source3/utils/net_afs.c
index 26259c12c0..f6b2b2db8a 100644
--- a/source3/utils/net_afs.c
+++ b/source3/utils/net_afs.c
@@ -51,8 +51,10 @@ int net_afs_key(struct net_context *c, int argc, const char **argv)
if (read(fd, &keyfile, sizeof(keyfile)) != sizeof(keyfile)) {
d_fprintf(stderr, _("Could not read keyfile\n"));
+ close(fd);
return -1;
}
+ close(fd);
if (!secrets_store_afs_keyfile(argv[1], &keyfile)) {
d_fprintf(stderr, _("Could not write keyfile to secrets.tdb\n"));