]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Avoid using released hosts
authorAndrew Deason <adeason@sinenomine.net>
Wed, 28 Oct 2009 16:06:47 +0000 (11:06 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Mon, 2 Nov 2009 18:51:53 +0000 (10:51 -0800)
commitc08609ae8a65f36179dfcd0ba93938b2369afa4f
tree3e9b354aee3332d2853842eca8aa355f4d247646
parentbdb4f98aeb9d383504a3adb0df92cd345884d86c
Avoid using released hosts

Since h_Release_r has the possibility of freeing a host, we should not
be using a host after it has been released. A few places can still use a
released host, potentially causing heap corruption, double frees, and
generally weird behavior.

So either move calls of h_Release_r until after we finish using a host,
or make sure to set the pointer to NULL after it has been released.

Reviewed-on: http://gerrit.openafs.org/747
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 416e2f11c35f5d55f91090b30b4db1a9bf6d6e07)

Change-Id: I91bd09c3e6d87476de8c66c2eb710c0fd424cadd
Reviewed-on: http://gerrit.openafs.org/762
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/viced/afsfileprocs.c
src/viced/callback.c
src/viced/host.c