aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/neighbour.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 29b8ee4e35d6..cc8a2f190acf 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1316,8 +1316,6 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
1316 *p = parms->next; 1316 *p = parms->next;
1317 parms->dead = 1; 1317 parms->dead = 1;
1318 write_unlock_bh(&tbl->lock); 1318 write_unlock_bh(&tbl->lock);
1319 if (parms->dev)
1320 dev_put(parms->dev);
1321 call_rcu(&parms->rcu_head, neigh_rcu_free_parms); 1319 call_rcu(&parms->rcu_head, neigh_rcu_free_parms);
1322 return; 1320 return;
1323 } 1321 }
@@ -1328,6 +1326,8 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
1328 1326
1329void neigh_parms_destroy(struct neigh_parms *parms) 1327void neigh_parms_destroy(struct neigh_parms *parms)
1330{ 1328{
1329 if (parms->dev)
1330 dev_put(parms->dev);
1331 kfree(parms); 1331 kfree(parms);
1332} 1332}
1333 1333