summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/cracknames.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c
index 8e97c45e7e..723f51356a 100644
--- a/source4/dsdb/samdb/cracknames.c
+++ b/source4/dsdb/samdb/cracknames.c
@@ -1278,6 +1278,9 @@ NTSTATUS crack_name_to_nt4_name(TALLOC_CTX *mem_ctx,
}
*nt4_domain = talloc_strdup(mem_ctx, info1.result_name);
+ if (*nt4_domain == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
p = strchr(*nt4_domain, '\\');
if (!p) {
@@ -1287,10 +1290,9 @@ NTSTATUS crack_name_to_nt4_name(TALLOC_CTX *mem_ctx,
if (p[1]) {
*nt4_account = talloc_strdup(mem_ctx, &p[1]);
- }
-
- if (!*nt4_account || !*nt4_domain) {
- return NT_STATUS_NO_MEMORY;
+ if (*nt4_account == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
}
return NT_STATUS_OK;