mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
Windows: AFSInitPIOCtlDirectoryCB free in try_exit
Process all conditional release of allocated memory on failure within the try_exit on failure. Change-Id: I4a29f6e9d2506c00713558849c49c377a74d607a Reviewed-on: http://gerrit.openafs.org/5625 Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com> Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
parent
782fba58db
commit
ada5908ca1
@ -5448,10 +5448,6 @@ AFSInitPIOCtlDirectoryCB( IN AFSObjectInfoCB *ObjectInfo)
|
||||
if( pNonPagedDirEntry == NULL)
|
||||
{
|
||||
|
||||
AFSExFreePool( pDirNode);
|
||||
|
||||
AFSDeleteObjectInfo( pObjectInfoCB);
|
||||
|
||||
try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
|
||||
}
|
||||
|
||||
@ -5492,7 +5488,21 @@ AFSInitPIOCtlDirectoryCB( IN AFSObjectInfoCB *ObjectInfo)
|
||||
|
||||
try_exit:
|
||||
|
||||
NOTHING;
|
||||
if ( !NT_SUCCESS( ntStatus))
|
||||
{
|
||||
|
||||
if ( pDirNode != NULL)
|
||||
{
|
||||
|
||||
AFSExFreePool( pDirNode);
|
||||
}
|
||||
|
||||
if ( pObjectInfoCB != NULL)
|
||||
{
|
||||
|
||||
AFSDeleteObjectInfo( pObjectInfoCB);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ntStatus;
|
||||
|
Loading…
Reference in New Issue
Block a user