[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

View File

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