forked from Mirrors/wine-wine
secur32: Missing LeaveCriticalSection on error paths.
parent
3e46363bfd
commit
968ad51d2a
|
@ -396,14 +396,20 @@ SecureProvider *SECUR32_addProvider(const SecurityFunctionTableA *fnTableA,
|
||||||
{
|
{
|
||||||
providerTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SecureProviderTable));
|
providerTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SecureProviderTable));
|
||||||
if (!providerTable)
|
if (!providerTable)
|
||||||
|
{
|
||||||
|
LeaveCriticalSection(&cs);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
list_init(&providerTable->table);
|
list_init(&providerTable->table);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = HeapAlloc(GetProcessHeap(), 0, sizeof(SecureProvider));
|
ret = HeapAlloc(GetProcessHeap(), 0, sizeof(SecureProvider));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
{
|
||||||
|
LeaveCriticalSection(&cs);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
list_add_tail(&providerTable->table, &ret->entry);
|
list_add_tail(&providerTable->table, &ret->entry);
|
||||||
ret->lib = NULL;
|
ret->lib = NULL;
|
||||||
|
@ -439,7 +445,10 @@ void SECUR32_addPackages(SecureProvider *provider, ULONG toAdd,
|
||||||
{
|
{
|
||||||
packageTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SecurePackageTable));
|
packageTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SecurePackageTable));
|
||||||
if (!packageTable)
|
if (!packageTable)
|
||||||
|
{
|
||||||
|
LeaveCriticalSection(&cs);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
packageTable->numPackages = 0;
|
packageTable->numPackages = 0;
|
||||||
list_init(&packageTable->table);
|
list_init(&packageTable->table);
|
||||||
|
|
Loading…
Reference in New Issue