diff options
Diffstat (limited to 'net/rose')
-rw-r--r-- | net/rose/rose_route.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index b18fe5043019..8631b65a7312 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -240,8 +240,7 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) | |||
240 | if ((s = rose_neigh_list) == rose_neigh) { | 240 | if ((s = rose_neigh_list) == rose_neigh) { |
241 | rose_neigh_list = rose_neigh->next; | 241 | rose_neigh_list = rose_neigh->next; |
242 | spin_unlock_bh(&rose_neigh_list_lock); | 242 | spin_unlock_bh(&rose_neigh_list_lock); |
243 | if (rose_neigh->digipeat != NULL) | 243 | kfree(rose_neigh->digipeat); |
244 | kfree(rose_neigh->digipeat); | ||
245 | kfree(rose_neigh); | 244 | kfree(rose_neigh); |
246 | return; | 245 | return; |
247 | } | 246 | } |
@@ -250,8 +249,7 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) | |||
250 | if (s->next == rose_neigh) { | 249 | if (s->next == rose_neigh) { |
251 | s->next = rose_neigh->next; | 250 | s->next = rose_neigh->next; |
252 | spin_unlock_bh(&rose_neigh_list_lock); | 251 | spin_unlock_bh(&rose_neigh_list_lock); |
253 | if (rose_neigh->digipeat != NULL) | 252 | kfree(rose_neigh->digipeat); |
254 | kfree(rose_neigh->digipeat); | ||
255 | kfree(rose_neigh); | 253 | kfree(rose_neigh); |
256 | return; | 254 | return; |
257 | } | 255 | } |