summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_usershare.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c
index 61b2caa606..f0ee682aee 100644
--- a/source3/utils/net_usershare.c
+++ b/source3/utils/net_usershare.c
@@ -907,6 +907,7 @@ static int net_usershare_add(struct net_context *c, int argc, const char **argv)
_("net usershare add: cannot lstat tmp file %s\n"),
full_path_tmp );
TALLOC_FREE(ctx);
+ close(tmpfd);
return -1;
}
@@ -916,6 +917,7 @@ static int net_usershare_add(struct net_context *c, int argc, const char **argv)
_("net usershare add: cannot fstat tmp file %s\n"),
full_path_tmp );
TALLOC_FREE(ctx);
+ close(tmpfd);
return -1;
}
@@ -925,6 +927,7 @@ static int net_usershare_add(struct net_context *c, int argc, const char **argv)
"file ?\n"),
full_path_tmp );
TALLOC_FREE(ctx);
+ close(tmpfd);
return -1;
}
@@ -934,6 +937,7 @@ static int net_usershare_add(struct net_context *c, int argc, const char **argv)
"to 0644n"),
full_path_tmp );
TALLOC_FREE(ctx);
+ close(tmpfd);
return -1;
}
@@ -957,6 +961,7 @@ static int net_usershare_add(struct net_context *c, int argc, const char **argv)
(unsigned int)to_write, full_path_tmp, strerror(errno));
unlink(full_path_tmp);
TALLOC_FREE(ctx);
+ close(tmpfd);
return -1;
}