s3: Fix Coverity ID 242717 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 ebc13c3334734686dc844992636f061008a059f8..022230becb5230800c8b83a254cf963ddf6e6ada 100644 (file)
@@ -2703,7 +2703,8 @@ static NTSTATUS cmd_samr_chgpasswd(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, };
        struct policy_handle user_pol = { 0, };
        NTSTATUS status, result;
        const char *user, *oldpass, *newpass;