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 bb3704e commit 288e2d1Copy full SHA for 288e2d1
net/ipv4/igmp.c
@@ -216,8 +216,10 @@ static void igmp_start_timer(struct ip_mc_list *im, int max_delay)
216
int tv = prandom_u32() % 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