[winpr,kerberos] fix possible NULL argument to strdup

This commit is contained in:
akallabeth 2024-09-14 08:30:37 +02:00
parent d5b41bb8a0
commit dbe92795e3
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
1 changed files with 2 additions and 1 deletions

View File

@ -902,7 +902,8 @@ static SECURITY_STATUS SEC_ENTRY kerberos_InitializeSecurityContextA(
isNewContext = TRUE; isNewContext = TRUE;
context->targetHost = _strdup(host); if (host)
context->targetHost = _strdup(host);
if (!context->targetHost) if (!context->targetHost)
{ {
status = SEC_E_INSUFFICIENT_MEMORY; status = SEC_E_INSUFFICIENT_MEMORY;