gpo: Fix CID 1034881 Resource leak
[sfrench/samba-autobuild/.git] / source4 / lib / policy / gp_filesys.c
index 9f60d2f98d4f0d40073ceb199fde62c02b5f9265..a528a2ece9a6cdde38b5c63045e50b37b057c011 100644 (file)
@@ -251,6 +251,7 @@ static NTSTATUS gp_get_file (struct smbcli_tree *tree, const char *remote_src,
                DEBUG(0, ("Remote/local file size mismatch after copying file: "
                          "%s (remote %zu, local %zu).\n",
                          remote_src, file_size, nread));
+               close(fh_local);
                talloc_free(buf);
                return NT_STATUS_UNSUCCESSFUL;
        }