aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/name_distr.c4
-rw-r--r--net/tipc/port.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index 376a30b9fd72..a6c989fd4988 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -240,9 +240,7 @@ static void node_is_down(struct publication *publ)
240 publ->type, publ->lower, publ->node, publ->ref, publ->key); 240 publ->type, publ->lower, publ->node, publ->ref, publ->key);
241 } 241 }
242 242
243 if (p) { 243 kfree(p);
244 kfree(p);
245 }
246} 244}
247 245
248/** 246/**
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 8bacd572a9fb..db14b7e0afdc 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -269,9 +269,7 @@ int tipc_deleteport(u32 ref)
269 buf = port_build_peer_abort_msg(p_ptr, TIPC_ERR_NO_PORT); 269 buf = port_build_peer_abort_msg(p_ptr, TIPC_ERR_NO_PORT);
270 tipc_nodesub_unsubscribe(&p_ptr->subscription); 270 tipc_nodesub_unsubscribe(&p_ptr->subscription);
271 } 271 }
272 if (p_ptr->user_port) { 272 kfree(p_ptr->user_port);
273 kfree(p_ptr->user_port);
274 }
275 273
276 spin_lock_bh(&tipc_port_list_lock); 274 spin_lock_bh(&tipc_port_list_lock);
277 list_del(&p_ptr->port_list); 275 list_del(&p_ptr->port_list);