nla: Fix handling of NULL identity
While the identity got correctly reset if no username was set,
identityPtr was dangling and caused AcquireCredentialsHandle to fail.
#include <time.h>
#include <ctype.h>
-
#include <freerdp/log.h>
#include <freerdp/crypto/tls.h>
#include <freerdp/build-config.h>
@@ -736,6 +735,7 @@ static BOOL nla_client_setup_identity(rdpNla* nla)
{
nla_identity_free(nla->identity);
nla->identity = NULL;
+ nla->identityPtr = NULL;
}
else if (settings->SmartcardLogon)
{
@@ -908,7 +908,8 @@ static BOOL parseKerberosDeltat(const char* value, INT32* dest, const char* mess
return FALSE;
}
- if (!*value || isspace(*value)) {
+ if (!*value || isspace(*value))
+ {
/* interpret that as a value in seconds */
*dest = v;
return TRUE;
