From: Jeffrey Altman Date: Wed, 1 Mar 2006 04:08:57 +0000 (+0000) Subject: viced-host-hold-leak-20060228 X-Git-Tag: mp-rxtcp-20060314~41 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2bd46f8a3915a37720e68d10a56a0ec33f508f67;p=packages%2Fo%2Fopenafs.git viced-host-hold-leak-20060228 fix a host hold leak although this one rarely occurs. --- diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 1a4587f68..dee27d38a 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -317,9 +317,11 @@ CallPreamble(register struct rx_call *acall, int activecall, H_LOCK; retry: tclient = h_FindClient_r(*tconn); + thost = tclient->host; if (tclient->prfail == 1) { /* couldn't get the CPS */ if (!retry_flag) { h_ReleaseClient_r(tclient); + h_Release_r(thost); ViceLog(0, ("CallPreamble: Couldn't get CPS. Fail\n")); H_UNLOCK; return -1001; @@ -334,6 +336,7 @@ CallPreamble(register struct rx_call *acall, int activecall, H_LOCK; if (code) { h_ReleaseClient_r(tclient); + h_Release_r(thost); H_UNLOCK; ViceLog(0, ("CallPreamble: couldn't reconnect to ptserver\n")); return -1001; @@ -341,10 +344,10 @@ CallPreamble(register struct rx_call *acall, int activecall, tclient->prfail = 2; /* Means re-eval client's cps */ h_ReleaseClient_r(tclient); + h_Release_r(thost); goto retry; } - thost = tclient->host; tclient->LastCall = thost->LastCall = FT_ApproxTime(); if (activecall) /* For all but "GetTime", "GetStats", and "GetCaps" calls */ thost->ActiveCall = thost->LastCall;