summaryrefslogtreecommitdiff
path: root/source4/lib/policy
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/policy')
-rw-r--r--source4/lib/policy/gp_filesys.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/lib/policy/gp_filesys.c b/source4/lib/policy/gp_filesys.c
index a528a2ece9a..b6107fceae7 100644
--- a/source4/lib/policy/gp_filesys.c
+++ b/source4/lib/policy/gp_filesys.c
@@ -563,14 +563,13 @@ NTSTATUS gp_create_gpt(struct gp_context *gp_ctx, const char *name,
}
rv = write(fd, file_content, strlen(file_content));
+ close(fd);
if (rv != strlen(file_content)) {
DEBUG(0, ("Short write in GPT.INI\n"));
talloc_free(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
}
- close(fd);
-
/* Upload the GPT to the sysvol share on a DC */
status = gp_push_gpt(gp_ctx, policy_dir, file_sys_path);
if (!NT_STATUS_IS_OK(status)) {