mirror of
https://github.com/reactos/reactos.git
synced 2024-09-15 07:05:04 +00:00
- Fix cleanup code
- We could possibly end up there with a NULL FileHandleObject and return a garbage FileHandle or crash - Now we always return a NULL FileHandle when we fail and free FileHandleObject if it has been allocated svn path=/branches/aicom-network-fixes/; revision=35946
This commit is contained in:
parent
4ff5fc5caa
commit
16427a1482
|
@ -331,10 +331,12 @@ cleanup:
|
|||
ExFreePool ( FullFileName.Buffer );
|
||||
FullFileName.Buffer = NULL;
|
||||
}
|
||||
if ( !NT_SUCCESS(*Status) && FileHandleObject != NULL )
|
||||
if ( !NT_SUCCESS(*Status) )
|
||||
{
|
||||
ExFreePool ( FileHandleObject );
|
||||
FileHandleObject = NULL;
|
||||
if( FileHandleObject ) {
|
||||
ExFreePool ( FileHandleObject );
|
||||
FileHandleObject = NULL;
|
||||
}
|
||||
*FileHandle = NULL;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue