From: Jeffrey Altman Date: Mon, 22 Aug 2011 13:00:47 +0000 (-0400) Subject: Windows: avoid cm_serverLock refcount leak X-Git-Tag: upstream/1.8.0_pre1^2~3378 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=add66023a05bf9a380eef34bd4fcc80d343fffad;p=packages%2Fo%2Fopenafs.git Windows: avoid cm_serverLock refcount leak Change-Id: I4e46750de130557b7d4779f83029b69bc28eaf4b Reviewed-on: http://gerrit.openafs.org/5293 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_volume.c b/src/WINNT/afsd/cm_volume.c index d37a70b5c..c1ee2c39c 100644 --- a/src/WINNT/afsd/cm_volume.c +++ b/src/WINNT/afsd/cm_volume.c @@ -1275,10 +1275,12 @@ cm_CheckOfflineVolumeState(cm_volume_t *volp, cm_vol_state_t *statep, afs_uint32 cm_VolumeStatusNotification(volp, statep->ID, statep->state, vl_alldown); statep->state = vl_alldown; } - } else if (statep->state != vl_alldown) { + } else { lock_ReleaseRead(&cm_serverLock); - cm_VolumeStatusNotification(volp, statep->ID, statep->state, vl_alldown); - statep->state = vl_alldown; + if (statep->state != vl_alldown) { + cm_VolumeStatusNotification(volp, statep->ID, statep->state, vl_alldown); + statep->state = vl_alldown; + } } } }