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>
Thu, 29 Oct 2009 20:01:49 +0000 (13:01 -0700)
commit416e2f11c35f5d55f91090b30b4db1a9bf6d6e07
treeacb676c493b939cc6c40f14487bf6b97a1760492
parent28ccbd1ad88f8cee34515b0552441083c310aa1d
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.

Change-Id: I3d5275c3862003e372d3c19a5462e62bf9cb269e
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>
src/viced/afsfileprocs.c
src/viced/callback.c
src/viced/host.c