mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
Windows: NotifyHardLink avoid null ptr reference
In AFSNotifyHardLink, if the TargetDirectoryCB out parameter is non-NULL but pDirNode is NULL, do not attempt to increment the DirOpenReferenceCount because doing so will trigger an exception. Change-Id: I9d50e05aff9a4922113f814dd3d50e115725ecca Reviewed-on: http://gerrit.openafs.org/9903 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
4a91ac6f83
commit
975c11cb35
@ -2419,6 +2419,9 @@ AFSNotifyHardLink( IN AFSObjectInfoCB *ObjectInfo,
|
|||||||
try_exit:
|
try_exit:
|
||||||
|
|
||||||
if ( TargetDirectoryCB != NULL)
|
if ( TargetDirectoryCB != NULL)
|
||||||
|
{
|
||||||
|
|
||||||
|
if ( pDirNode != NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
lCount = InterlockedIncrement( &pDirNode->DirOpenReferenceCount);
|
lCount = InterlockedIncrement( &pDirNode->DirOpenReferenceCount);
|
||||||
@ -2431,6 +2434,7 @@ try_exit:
|
|||||||
lCount));
|
lCount));
|
||||||
|
|
||||||
ASSERT( lCount >= 0);
|
ASSERT( lCount >= 0);
|
||||||
|
}
|
||||||
|
|
||||||
*TargetDirectoryCB = pDirNode;
|
*TargetDirectoryCB = pDirNode;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user