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 237ff25 commit e2b706cCopy full SHA for e2b706c
net/ipv4/igmp.c
@@ -216,8 +216,10 @@ static void igmp_start_timer(struct ip_mc_list *im, int max_delay)
216
int tv = get_random_u32_below(max_delay);
217
218
im->tm_running = 1;
219
- if (!mod_timer(&im->timer, jiffies+tv+2))
220
- refcount_inc(&im->refcnt);
+ if (refcount_inc_not_zero(&im->refcnt)) {
+ if (mod_timer(&im->timer, jiffies + tv + 2))
221
+ ip_ma_put(im);
222
+ }
223
}
224
225
static void igmp_gq_start_timer(struct in_device *in_dev)
0 commit comments