rpcrt4: Freeing a NULL context handle is allowed.
This commit is contained in:
parent
1a346a4a13
commit
ec5b3c3ea6
|
@ -4504,12 +4504,15 @@ static UINT ndr_update_context_handle(NDR_CCONTEXT *CContext,
|
||||||
/* a null UUID means we should free the context handle */
|
/* a null UUID means we should free the context handle */
|
||||||
if (IsEqualGUID(&chi->uuid, &GUID_NULL))
|
if (IsEqualGUID(&chi->uuid, &GUID_NULL))
|
||||||
{
|
{
|
||||||
che = get_context_entry(*CContext);
|
if (*CContext)
|
||||||
if (!che)
|
{
|
||||||
return ERROR_INVALID_HANDLE;
|
che = get_context_entry(*CContext);
|
||||||
list_remove(&che->entry);
|
if (!che)
|
||||||
HeapFree(GetProcessHeap(), 0, che);
|
return ERROR_INVALID_HANDLE;
|
||||||
che = NULL;
|
list_remove(&che->entry);
|
||||||
|
HeapFree(GetProcessHeap(), 0, che);
|
||||||
|
che = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* if there's no existing entry matching the GUID, allocate one */
|
/* if there's no existing entry matching the GUID, allocate one */
|
||||||
else if (!(che = context_entry_from_guid(&chi->uuid)))
|
else if (!(che = context_entry_from_guid(&chi->uuid)))
|
||||||
|
|
Loading…
Reference in New Issue