]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-viced-findclient-do-not-return-wrong-client-20060620
authorJeffrey Hutzelman <jhutz@cs.cmu.edu>
Tue, 20 Jun 2006 21:03:16 +0000 (21:03 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 20 Jun 2006 21:03:16 +0000 (21:03 +0000)
In h_FindClient_r it was possible for the wrong client to be returned
and worse for it to be returned without the reference count being
incremented.

(cherry picked from commit 06fa1f9c40432747724e6e55154bf54e1e3e94c5)

src/viced/host.c

index 41f20409213b0c41c928a48f32c8bf9b5c178282..335ab97cc8842c91af3a9c7de0c4ddf5fbeee189 100644 (file)
@@ -1645,6 +1645,8 @@ h_FindClient_r(struct rx_connection *tcon)
        H_UNLOCK;
        ObtainWriteLock(&client->lock); /* released at end */
        H_LOCK;
+    } else {
+       client = NULL;
     }
 
     authClass = rx_SecurityClassOf((struct rx_connection *)tcon);