s4-torture: fix invalid dereference of binding handle in mgmt test.
authorGünther Deschner <gd@samba.org>
Tue, 21 Apr 2015 10:07:08 +0000 (12:07 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 22 Apr 2015 15:43:21 +0000 (17:43 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source4/torture/rpc/mgmt.c

index 4376f08d14f89718857b7aaa2500ce8032c95886..f3344c9510e83e99fe5aea6b4b5591d5af9c9f08 100644 (file)
@@ -287,13 +287,14 @@ bool torture_rpc_mgmt(struct torture_context *tctx)
                        talloc_free(loop_ctx);
                        continue;
                }
-               bh = p->binding_handle;
 
                if (!NT_STATUS_IS_OK(status)) {
                        talloc_free(loop_ctx);
+                       torture_comment(tctx, "Interface not available (%s) - skipping\n", nt_errstr(status));
                        ret = false;
                        continue;
                }
+               bh = p->binding_handle;
 
                if (!test_is_server_listening(tctx, bh, loop_ctx)) {
                        ret = false;