s4:torture: Fix the scope of the req variable in drsuapi test
authorAndreas Schneider <asn@samba.org>
Wed, 26 Sep 2018 12:34:07 +0000 (14:34 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 19 Oct 2018 21:11:26 +0000 (23:11 +0200)
Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/rpc/drsuapi.c

index 1d535acafba144ca05f592157410d103ada3ea9d..a424a3160c66e6cdebd4f35cd9a0a538065d1562 100644 (file)
@@ -94,6 +94,7 @@ static bool test_DsGetDomainControllerInfo(struct torture_context *tctx,
        struct dcerpc_pipe *p = priv->drs_pipe;
        struct drsuapi_DsGetDomainControllerInfo r;
        union drsuapi_DsGetDCInfoCtr ctr;
+       union drsuapi_DsGetDCInfoRequest req;
        int32_t level_out = 0;
        bool found = false;
        int i, j, k;
@@ -124,7 +125,6 @@ static bool test_DsGetDomainControllerInfo(struct torture_context *tctx,
 
        for (i=0; i < ARRAY_SIZE(levels); i++) {
                for (j=0; j < ARRAY_SIZE(names); j++) {
-                       union drsuapi_DsGetDCInfoRequest req;
                        level = levels[i];
                        r.in.bind_handle = &priv->bind_handle;
                        r.in.level = 1;