Close samr_handle if open_domain failed
authorVolker Lendecke <vl@samba.org>
Sat, 7 Feb 2009 10:28:38 +0000 (11:28 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 7 Feb 2009 18:25:34 +0000 (19:25 +0100)
source3/smbd/lanman.c

index 4807e62436285b9a2aff33c966ed408e4c1a144b..4758e57e21fb1ef6e67122257c4117d71b71c437 100644 (file)
@@ -2353,6 +2353,7 @@ static bool api_RNetUserEnum(connection_struct *conn, uint16 vuid,
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("api_RNetUserEnum: samr_OpenDomain failed: %s\n",
                          nt_errstr(status)));
+               rpccli_samr_Close(samr_pipe, talloc_tos(), &samr_handle);
                return false;
        }