gpo: Fix CID 1034881 Resource leak
authorVolker Lendecke <vl@samba.org>
Sun, 10 Nov 2013 18:43:48 +0000 (19:43 +0100)
committerIra Cooper <ira@samba.org>
Mon, 11 Nov 2013 20:04:09 +0000 (21:04 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
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;
        }