summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-04-29 11:12:18 +0800
committerJiri Slaby <jslaby@suse.cz>2014-06-27 10:25:13 +0200
commit481956841e2e0f88b519267c91d86b7625e2a3af (patch)
tree5e9e85a51309b26acab031c3acc94982b7994f97 /net
parent4c65d4f6fd4ae448900a9c3a0a9a31c5a5583774 (diff)
tipc: fix memory leak of publications
commit 1621b94d2a655c8548ddbdfc8ccf907a5bbdc860 upstream. Commit 1bb8dce57f4d15233688c68990852a10eb1cd79f ("tipc: fix memory leak during module removal") introduced a memory leak issue: when name table is stopped, it's forgotten that publication instances are freed properly. Additionally the useless "continue" statement in tipc_nametbl_stop() is removed as well. Reported-by: Jason <huzhijiang@gmail.com> Signed-off-by: Ying Xue <ying.xue@windriver.com> Acked-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'net')
-rw-r--r--net/tipc/name_table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 299e45af7e4e..ec2ecbd515ae 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -962,6 +962,7 @@ static void tipc_purge_publications(struct name_seq *seq)
list_for_each_entry_safe(publ, safe, &info->zone_list, zone_list) {
tipc_nametbl_remove_publ(publ->type, publ->lower, publ->node,
publ->ref, publ->key);
+ kfree(publ);
}
}
@@ -986,7 +987,6 @@ void tipc_nametbl_stop(void)
hlist_for_each_entry_safe(seq, safe, seq_head, ns_list) {
tipc_purge_publications(seq);
}
- continue;
}
kfree(table.types);
table.types = NULL;