s3: Fix Coverity ID 242721 Uninitialized scalar variable
authorVolker Lendecke <vl@samba.org>
Wed, 9 May 2012 08:56:54 +0000 (10:56 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 10 May 2012 07:11:57 +0000 (09:11 +0200)
In an error path we are closing domain_pol without opening it

source3/rpcclient/cmd_samr.c

index 7b8dda2ae8e0cbe72d0af2b72109ebbde064da3f..a0db1aa5731a29ca34e7c35a3373e83bda199e43 100644 (file)
@@ -880,7 +880,8 @@ static NTSTATUS cmd_samr_enum_dom_users(struct rpc_pipe_client *cli,
                                        TALLOC_CTX *mem_ctx,
                                        int argc, const char **argv)
 {
-       struct policy_handle connect_pol, domain_pol;
+       struct policy_handle connect_pol;
+       struct policy_handle domain_pol = { 0, };
        NTSTATUS status, result;
        uint32 start_idx, num_dom_users, i;
        struct samr_SamArray *dom_users = NULL;