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

src/viced/afsfileprocs.c

index 1a4587f68136bece703e2e1249b0fa6beab28c14..dee27d38abbf0f6ed1ba4d8bf485e12e2799e757 100644 (file)
@@ -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;