mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 16:00:12 +00:00
Windows: Protect against null volp dereference
In cm_RecycleSCache cm_GetVolumeByFID can fail leaving 'volp' a NULL pointer. Do not call cm_PutVolume() if cm_GetVolumeByFID fails. Change-Id: I57eaf5d40130ecad75a312ef5487cdfa6e7367e3 Reviewed-on: http://gerrit.openafs.org/7506 Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
parent
ce8d0aefd1
commit
e94b233869
@ -173,9 +173,12 @@ long cm_RecycleSCache(cm_scache_t *scp, afs_int32 flags)
|
||||
!cm_accessPerFileCheck) {
|
||||
cm_volume_t *volp = cm_GetVolumeByFID(&scp->fid);
|
||||
|
||||
if (!(volp && (volp->flags & CM_VOLUMEFLAG_DFS_VOLUME)))
|
||||
cm_EAccesClearParentEntries(&fid);
|
||||
cm_PutVolume(volp);
|
||||
if (volp) {
|
||||
if (!(volp->flags & CM_VOLUMEFLAG_DFS_VOLUME))
|
||||
cm_EAccesClearParentEntries(&fid);
|
||||
|
||||
cm_PutVolume(volp);
|
||||
}
|
||||
}
|
||||
|
||||
/* invalidate so next merge works fine;
|
||||
|
Loading…
Reference in New Issue
Block a user