]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Avoid prematurely destroying callback_rxcon
authorAndrew Deason <adeason@sinenomine.net>
Thu, 22 Oct 2009 16:12:30 +0000 (11:12 -0500)
committerRuss Allbery <rra@debian.org>
Wed, 4 Nov 2009 01:29:38 +0000 (17:29 -0800)
commitae6a3c79366d3906f46f59f424f2b9ef72a8186e
tree3e3e33ebf7a0d64817a17f787163168aff6cea1c
parent0355940a6538b1a39b4f16f7c3584a3b9e3d5767
Avoid prematurely destroying callback_rxcon

Currently, h_GetHost_r and removeAddress_r can destroy the
callback_rxcon of a host. Having a NULL callback_rxcon can cause
segfaults in code that does not properly check if a host has been
HOSTDELETED before trying to use it.

Although such code is incorrect and should be fixed, we can still avoid
a segfault in those situations by not destroying callback_rxcon until we
destroy the host itself. This just prevents destroying callback_rxcon in
h_GetHost_r and removeAddress_r, leaving it to h_TossStuff_r to destroy
when it destroys the host.

Reviewed-on: http://gerrit.openafs.org/717
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit bbcfbe1a04eda9e75b1643be88cf9d4842a8aa86)

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