]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
viced-client-refcount-leak-20060228
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 1 Mar 2006 05:04:00 +0000 (05:04 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 1 Mar 2006 05:04:00 +0000 (05:04 +0000)
SRXAFS_CallBackRxConnAddr calls h_FindClient_r which returns a
client with a refCount and the client->host held.  The call
to CallPostamble will release the host hold but not the client
refcount.

src/viced/afsfileprocs.c

index dee27d38abbf0f6ed1ba4d8bf485e12e2799e757..9577f6cd67fb75a6de904f5a058a8e8d6e0aa8f3 100644 (file)
@@ -7346,6 +7346,8 @@ SRXAFS_CallBackRxConnAddr (struct rx_call * acall, afs_int32 *addr)
        thost->host           = addr;
        rx_SetConnDeadTime(thost->callback_rxcon, 50);
        rx_SetConnHardDeadTime(thost->callback_rxcon, AFS_HARDDEADTIME);
+       h_ReleaseClient_r(tclient);
+       /* The hold on thost will be released by CallPostamble */
        H_UNLOCK;
        errorCode = CallPostamble(tcon, errorCode);
        return errorCode;
@@ -7353,6 +7355,8 @@ SRXAFS_CallBackRxConnAddr (struct rx_call * acall, afs_int32 *addr)
        rx_DestroyConnection(conn);
     }      
   Bad_CallBackRxConnAddr:
+    h_ReleaseClient_r(tclient);
+    /* The hold on thost will be released by CallPostamble */
     H_UNLOCK;
 #endif