viced: Avoid ref leak on origin callback break
authorAndrew Deason <adeason@sinenomine.net>
Wed, 27 Apr 2011 19:23:43 +0000 (14:23 -0500)
committerDerrick Brashear <shadow@dementia.org>
Thu, 28 Apr 2011 17:14:32 +0000 (10:14 -0700)
commitaf175ce2c7a4785ef1992d096adfdb27daa86ee4
treefda77dc84fc45a10ddfd914761bd2ac3425b911e
parent9a4e3ade396583d412a85c4e03238d18d5c533ee
viced: Avoid ref leak on origin callback break

When breaking a callback, sometimes we send a callback to the host
that performed the callback-inducing operation. When we do this,
currently BreakCallBack gives the origin host structure to
MultiBreakCallBack_r, which avoids releasing that host after the
callback is broken.

However, BreakCallBack obtains a reference to every host to which it
delivers a callback, even if it is the origin host, so a reference is
leaked. Fix this by not ever passing a host to MultiBreakCallBack_r,
and just have MultiBreakCallBack_r release a reference for every host
to which it delivers a callback break.

FIXES 129376

Change-Id: I88503f29f80d4233c062ff448fc4d912e401e8e4
Reviewed-on: http://gerrit.openafs.org/4581
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/viced/callback.c