]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-viced-client-refcount-leak-20060228
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 1 Mar 2006 05:04:32 +0000 (05:04 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 1 Mar 2006 05:04:32 +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.

(cherry picked from commit 6f707d94064646762e7014d19840b5b2902b3a4e)

src/viced/afsfileprocs.c

index 3114084948697e10ab6d9b8da85c0e0513069cc3..2a330e0fdcfe5acff4fa7e637df8339a1426fba4 100644 (file)
@@ -7473,6 +7473,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;
@@ -7480,6 +7482,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