On 21.12.2017 13:04, Ying Xue wrote:
Good catch. But after I take a closer look at the code, it's found there
are another similar memory leak in tipc_enable_bearer():
if (tipc_mon_create(net, bearer_id))
return -ENOMEM;
So I suggest you should solve it together with it.
Thanks! How about this?
- if (tipc_mon_create(net, bearer_id))
+ if (tipc_mon_create(net, bearer_id)) {
+ bearer_disable(net, b);
return -ENOMEM;
+ }
Tested it briefly, seems to work.
I can post it as a separate patch.
Tommi
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion