With the previous check I got random failures when trying to connect to the
LDAP server.
}
*nt4_domain = talloc_strdup(mem_ctx, info1.result_name);
}
*nt4_domain = talloc_strdup(mem_ctx, info1.result_name);
+ if (*nt4_domain == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
p = strchr(*nt4_domain, '\\');
if (!p) {
p = strchr(*nt4_domain, '\\');
if (!p) {
if (p[1]) {
*nt4_account = talloc_strdup(mem_ctx, &p[1]);
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;
+ }