|
@@ -148,6 +148,7 @@ void stop_timer ( struct retry_timer *timer ) {
|
148
|
148
|
* @v timer Retry timer
|
149
|
149
|
*/
|
150
|
150
|
static void timer_expired ( struct retry_timer *timer ) {
|
|
151
|
+ struct refcnt *refcnt = timer->refcnt;
|
151
|
152
|
int fail;
|
152
|
153
|
|
153
|
154
|
/* Stop timer without performing RTT calculations */
|
|
@@ -169,8 +170,9 @@ static void timer_expired ( struct retry_timer *timer ) {
|
169
|
170
|
|
170
|
171
|
/* Call expiry callback */
|
171
|
172
|
timer->expired ( timer, fail );
|
|
173
|
+ /* If refcnt is NULL, then timer may already have been freed */
|
172
|
174
|
|
173
|
|
- ref_put ( timer->refcnt );
|
|
175
|
+ ref_put ( refcnt );
|
174
|
176
|
}
|
175
|
177
|
|
176
|
178
|
/**
|