From 849169a7b6ed0beb78bbddf25537521c1ed2f8e1 Mon Sep 17 00:00:00 2001 From: Swen Schillig Date: Thu, 25 Jan 2018 11:02:15 +0100 Subject: [PATCH] Fix wrong condition for error string assignment Signed-off-by: Swen Schillig Reviewed-by: Volker Lendecke Reviewed-by: David Disseldorp Autobuild-User(master): David Disseldorp Autobuild-Date(master): Thu Jan 25 17:19:12 CET 2018 on sn-devel-144 --- source4/libnet/libnet_join.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c index 9a1e58f72e7..6cd18e02c9b 100644 --- a/source4/libnet/libnet_join.c +++ b/source4/libnet/libnet_join.c @@ -929,7 +929,7 @@ NTSTATUS libnet_Join_member(struct libnet_context *ctx, uint32_t acct_type = 0; const char *account_name; const char *netbios_name; - const char *error_string; + const char *error_string = NULL; r->out.error_string = NULL; @@ -1000,7 +1000,7 @@ NTSTATUS libnet_Join_member(struct libnet_context *ctx, status = provision_store_self_join(ctx, ctx->lp_ctx, ctx->event_ctx, set_secrets, &error_string); if (!NT_STATUS_IS_OK(status)) { - if (r->out.error_string) { + if (error_string) { r->out.error_string = talloc_steal(mem_ctx, error_string); } else { r->out.error_string