mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 14:34:57 +08:00
[KERNEL32] Check Basep8BitStringToDynamicUnicodeString() return and only call -W in case of success
CID 1419330
This commit is contained in:
@@ -344,17 +344,18 @@ WINAPI
|
||||
WaitNamedPipeA(LPCSTR lpNamedPipeName,
|
||||
DWORD nTimeOut)
|
||||
{
|
||||
BOOL r;
|
||||
BOOL r = FALSE;
|
||||
UNICODE_STRING NameU;
|
||||
|
||||
/* Convert the name to Unicode */
|
||||
Basep8BitStringToDynamicUnicodeString(&NameU, lpNamedPipeName);
|
||||
if (Basep8BitStringToDynamicUnicodeString(&NameU, lpNamedPipeName))
|
||||
{
|
||||
/* Call the Unicode API */
|
||||
r = WaitNamedPipeW(NameU.Buffer, nTimeOut);
|
||||
|
||||
/* Call the Unicode API */
|
||||
r = WaitNamedPipeW(NameU.Buffer, nTimeOut);
|
||||
|
||||
/* Free the Unicode string */
|
||||
RtlFreeUnicodeString(&NameU);
|
||||
/* Free the Unicode string */
|
||||
RtlFreeUnicodeString(&NameU);
|
||||
}
|
||||
|
||||
/* Return result */
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user