uchar lm_hash[16];
uchar nt_hash[16];
DATA_BLOB chall = get_challenge();
- char *error_string;
+ char *error_string = NULL;
ZERO_STRUCT(lm_key);
ZERO_STRUCT(user_session_key);
user_session_key,
&authoritative,
&error_string, NULL);
-
- data_blob_free(&lm_response);
- data_blob_free(&nt_response);
-
if (!NT_STATUS_IS_OK(nt_status)) {
d_printf("%s (0x%x)\n",
error_string,
NT_STATUS_V(nt_status));
- SAFE_FREE(error_string);
- data_blob_free(&session_key);
- return break_which == BREAK_NT;
+ pass = (break_which == BREAK_NT);
+ goto done;
}
/* If we are told the DC is Samba4, expect an LM key of zeros */
pass = False;
}
}
+
+done:
+ data_blob_free(&lm_response);
+ data_blob_free(&nt_response);
data_blob_free(&session_key);
+ SAFE_FREE(error_string);
return pass;
}