From e99150c87202bff47eb7f0343cab786dc0109ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Tue, 21 Apr 2015 12:07:08 +0200 Subject: [PATCH] s4-torture: fix invalid dereference of binding handle in mgmt test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: Michael Adam --- source4/torture/rpc/mgmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c index 4376f08d14f..f3344c9510e 100644 --- a/source4/torture/rpc/mgmt.c +++ b/source4/torture/rpc/mgmt.c @@ -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;