* [PATCH net-next] tipc: fix memory leak of publications
@ 2014-04-29 3:12 Ying Xue
2014-04-30 17:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ying Xue @ 2014-04-29 3:12 UTC (permalink / raw)
To: davem
Cc: jon.maloy, Paul.Gortmaker, erik.hugne, huzhijiang, netdev,
tipc-discussion
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>
---
net/tipc/name_table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 9bcf4b5..9d7d37d 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -969,6 +969,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);
}
}
@@ -990,7 +991,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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] tipc: fix memory leak of publications
2014-04-29 3:12 [PATCH net-next] tipc: fix memory leak of publications Ying Xue
@ 2014-04-30 17:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-04-30 17:32 UTC (permalink / raw)
To: ying.xue
Cc: jon.maloy, Paul.Gortmaker, erik.hugne, huzhijiang, netdev,
tipc-discussion
From: Ying Xue <ying.xue@windriver.com>
Date: Tue, 29 Apr 2014 11:12:18 +0800
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-30 17:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-29 3:12 [PATCH net-next] tipc: fix memory leak of publications Ying Xue
2014-04-30 17:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).