mempool: fix anonymous populate
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 17 Jan 2020 14:34:29 +0000 (15:34 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 20 Jan 2020 11:12:20 +0000 (12:12 +0100)
The documentation says that a negative errno is returned on error, but
in most places that's not the case.

Fix the documentation and the exceptions in code. The second one
(return from populate_virt) also fixes a memory leak.

Note that testpmd was using the function correctly.

Fixes: aa10457eb4c2 ("mempool: make mempool populate and free api public")
Fixes: 6780f72fb82f ("mempool: populate with anonymous memory")
Fixes: 66e7ba0bad4c ("mempool: ensure mempool is initialized before populating")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

No differences found