rpcrt4: Freeing a NULL context handle is allowed.

This commit is contained in:
Robert Shearman 2006-06-02 20:43:44 +01:00 committed by Alexandre Julliard
parent 1a346a4a13
commit ec5b3c3ea6
1 changed files with 9 additions and 6 deletions

View File

@ -4503,6 +4503,8 @@ static UINT ndr_update_context_handle(NDR_CCONTEXT *CContext,
/* a null UUID means we should free the context handle */
if (IsEqualGUID(&chi->uuid, &GUID_NULL))
{
if (*CContext)
{
che = get_context_entry(*CContext);
if (!che)
@ -4511,6 +4513,7 @@ static UINT ndr_update_context_handle(NDR_CCONTEXT *CContext,
HeapFree(GetProcessHeap(), 0, che);
che = NULL;
}
}
/* if there's no existing entry matching the GUID, allocate one */
else if (!(che = context_entry_from_guid(&chi->uuid)))
{