s4:dsdb Fix crash from LDAP login of DOM\\
[ira/wip.git] / source4 / dsdb / samdb / cracknames.c
index 723f51356a5c36a512298379d5405b7a172077fe..8f7f481e2db6b03ae2d5801d482367b3270292b2 100644 (file)
@@ -1288,11 +1288,9 @@ NTSTATUS crack_name_to_nt4_name(TALLOC_CTX *mem_ctx,
        }
        p[0] = '\0';
 
-       if (p[1]) {
-               *nt4_account = talloc_strdup(mem_ctx, &p[1]);
-               if (*nt4_account == NULL) {
-                       return NT_STATUS_NO_MEMORY;
-               }
+       *nt4_account = talloc_strdup(mem_ctx, &p[1]);
+       if (*nt4_account == NULL) {
+               return NT_STATUS_NO_MEMORY;
        }
 
        return NT_STATUS_OK;