We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f1d632 commit bc5dc0cCopy full SHA for bc5dc0c
net/ipv4/igmp.c
@@ -222,8 +222,10 @@ static void igmp_start_timer(struct ip_mc_list *im, int max_delay)
222
int tv = prandom_u32() % max_delay;
223
224
im->tm_running = 1;
225
- if (!mod_timer(&im->timer, jiffies+tv+2))
226
- refcount_inc(&im->refcnt);
+ if (refcount_inc_not_zero(&im->refcnt)) {
+ if (mod_timer(&im->timer, jiffies + tv + 2))
227
+ ip_ma_put(im);
228
+ }
229
}
230
231
static void igmp_gq_start_timer(struct in_device *in_dev)
0 commit comments