summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/netapi/joindomain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c
index d17d2d82f8..e5d28735ed 100644
--- a/source3/lib/netapi/joindomain.c
+++ b/source3/lib/netapi/joindomain.c
@@ -314,6 +314,10 @@ WERROR NetGetJoinInformation_r(struct libnetapi_ctx *ctx,
goto done;
}
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
+
*r->out.name_buffer = talloc_strdup(ctx, buffer);
W_ERROR_HAVE_NO_MEMORY(*r->out.name_buffer);