rx: fix call refcount leak in error case 81/12781/2
authorBenjamin Kaduk <kaduk@mit.edu>
Tue, 28 Nov 2017 04:07:53 +0000 (22:07 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Tue, 28 Nov 2017 15:14:50 +0000 (10:14 -0500)
The recent event handling normalization in commit
304d758983b499dc568d6ca57b6e92df24b69de8 had event handlers switch
to dropping their reference on the associated connection/call just
before return.  An early return case was missed in the conversion,
leading to a refcount leak in an error case.

Change-Id: Ie3d0bc9474fdbc09be9c753f4d0192c8cca68351
Reviewed-on: https://gerrit.openafs.org/12781
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/rx/rx.c

index ce9adcb..9dc2e2b 100644 (file)
@@ -6463,6 +6463,7 @@ rxi_KeepAliveEvent(struct rxevent *event, void *arg1, void *dummy,
 
     if (rxi_CheckCall(call, 0)) {
        MUTEX_EXIT(&call->lock);
+       CALL_RELE(call, RX_CALL_REFCOUNT_ALIVE);
        return;
     }