Re: [dpdk-dev] [PATCH] mem: fix resource leak

2018-10-23 Thread Thomas Monjalon
22/10/2018 22:34, Thomas Monjalon: > 22/10/2018 14:57, Anatoly Burakov: > > Segment preallocation code allocates an array of structures on the > > heap but does not free the memory afterwards. Fix it by freeing it > > at the end of the function, and changing control flow to always go > > through th

Re: [dpdk-dev] [PATCH] mem: fix resource leak

2018-10-22 Thread Thomas Monjalon
22/10/2018 14:57, Anatoly Burakov: > Segment preallocation code allocates an array of structures on the > heap but does not free the memory afterwards. Fix it by freeing it > at the end of the function, and changing control flow to always go > through that code path. > > Fixes: 1dd342d0fdc4 ("mem:

[dpdk-dev] [PATCH] mem: fix resource leak

2018-10-22 Thread Anatoly Burakov
Segment preallocation code allocates an array of structures on the heap but does not free the memory afterwards. Fix it by freeing it at the end of the function, and changing control flow to always go through that code path. Fixes: 1dd342d0fdc4 ("mem: improve segment list preallocation") Coverity