summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/netapi/joindomain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c
index 8fe6193f40..ceb7ca10d9 100644
--- a/source3/lib/netapi/joindomain.c
+++ b/source3/lib/netapi/joindomain.c
@@ -33,13 +33,13 @@ static WERROR NetJoinDomainLocal(struct libnetapi_ctx *mem_ctx,
struct libnet_JoinCtx *r = NULL;
WERROR werr;
- werr = libnet_init_JoinCtx(mem_ctx, &r);
- W_ERROR_NOT_OK_RETURN(werr);
-
if (!domain_name) {
return WERR_INVALID_PARAM;
}
+ werr = libnet_init_JoinCtx(mem_ctx, &r);
+ W_ERROR_NOT_OK_RETURN(werr);
+
r->in.domain_name = talloc_strdup(mem_ctx, domain_name);
W_ERROR_HAVE_NO_MEMORY(r->in.domain_name);