From: Ilias Apalodimas <[email protected]> Added 2 additional missing frees in _odp_queue_pool_create() as requested on review.
Signed-off-by: Ilias Apalodimas <[email protected]> --- /** Email created from pull request 101 (apalos:bug_3182) ** https://github.com/Linaro/odp/pull/101 ** Patch: https://github.com/Linaro/odp/pull/101.patch ** Base sha: 4537d096721a753086592ed5a989beab5647bcfa ** Merge commit sha: 7bee8312cef61d52ce1c788583f3831f05afcfeb **/ platform/linux-generic/odp_pkt_queue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_pkt_queue.c b/platform/linux-generic/odp_pkt_queue.c index 06420a96..f1086096 100644 --- a/platform/linux-generic/odp_pkt_queue.c +++ b/platform/linux-generic/odp_pkt_queue.c @@ -241,8 +241,11 @@ _odp_int_queue_pool_t _odp_queue_pool_create(uint32_t max_num_queues, */ initial_free_list_size = MIN(64 * 1024, max_queued_pkts / 4); rc = pkt_queue_free_list_add(pool, initial_free_list_size); - if (rc < 0) + if (rc < 0) { + free(pool->queue_num_tbl); + free(pool); return _ODP_INT_QUEUE_POOL_INVALID; + } /* Discard the first queue blk with idx 0 */ queue_blk_alloc(pool, &first_queue_blk_idx);
