]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-viced-host-hold-leak-20060228
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 1 Mar 2006 04:09:41 +0000 (04:09 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 1 Mar 2006 04:09:41 +0000 (04:09 +0000)
fix a host hold leak although this one rarely occurs.

(cherry picked from commit 2bd46f8a3915a37720e68d10a56a0ec33f508f67)

src/viced/afsfileprocs.c

index 7a4443690a3a652f64664d4118777d8f8e6bcce9..3114084948697e10ab6d9b8da85c0e0513069cc3 100644 (file)
@@ -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;