From 1e06402214dc6f05126004171606465626a0382f Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 1 Mar 2006 04:09:41 +0000 Subject: [PATCH] STABLE14-viced-host-hold-leak-20060228 fix a host hold leak although this one rarely occurs. (cherry picked from commit 2bd46f8a3915a37720e68d10a56a0ec33f508f67) --- src/viced/afsfileprocs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 7a4443690..311408494 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -315,9 +315,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; @@ -332,6 +334,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; @@ -339,10 +342,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; -- 2.39.5