mirror of
https://github.com/reactos/reactos.git
synced 2024-07-02 02:34:53 +00:00
[KERNEL32] Check Basep8BitStringToDynamicUnicodeString() return and only call -W in case of success
CID 1419330
This commit is contained in:
parent
19f1cd78c1
commit
3832f83a32
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue