summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/registry/patchfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c
index 925806985e..24d86abf48 100644
--- a/source4/lib/registry/patchfile.c
+++ b/source4/lib/registry/patchfile.c
@@ -316,6 +316,7 @@ _PUBLIC_ WERROR reg_diff_load(const char *filename,
if (read(fd, &hdr, 4) != 4) {
DEBUG(0, ("Error reading registry patch file `%s'\n",
filename));
+ close(fd);
return WERR_GENERAL_FAILURE;
}