mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[WS2_32] Fix error handling on non-existing registry keys
This commit is contained in:
@@ -59,6 +59,17 @@ WsTcOpen(IN PTCATALOG Catalog,
|
||||
&RegType,
|
||||
NULL,
|
||||
&RegSize);
|
||||
if (ErrorCode != ERROR_SUCCESS)
|
||||
{
|
||||
DPRINT1("Failed to get protocol catalog name: %d.\n", ErrorCode);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (RegType != REG_SZ)
|
||||
{
|
||||
DPRINT1("Protocol catalog name is not a string (Type %d).\n", RegType);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CatalogKeyName = HeapAlloc(WsSockHeap, 0, RegSize);
|
||||
|
||||
|
||||
@@ -58,6 +58,17 @@ WsNcOpen(IN PNSCATALOG Catalog,
|
||||
&RegType,
|
||||
NULL,
|
||||
&RegSize);
|
||||
if (ErrorCode != ERROR_SUCCESS)
|
||||
{
|
||||
DPRINT1("Failed to get namespace catalog name: %d.\n", ErrorCode);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (RegType != REG_SZ)
|
||||
{
|
||||
DPRINT1("Namespace catalog name is not a string (Type %d).\n", RegType);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CatalogKeyName = HeapAlloc(WsSockHeap, 0, RegSize);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user