diff options
author | 2016-12-05 11:42:44 +0100 | |
---|---|---|
committer | 2016-12-05 11:49:52 +0100 | |
commit | c300e3551a11a249b600463891a19a6792f42901 (patch) | |
tree | 0ec046063bf0cd783e9a7ccbb4f54baadccf1213 /lib/librte_mbuf | |
parent | 893ab58d98e090c1631f4e2dd43069eeb58e78dc (diff) |
Imported Upstream version 16.07.2
Change-Id: I76bc313e0942233ce259612069ded302dd6c87bb
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'lib/librte_mbuf')
-rw-r--r-- | lib/librte_mbuf/rte_mbuf.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 4846b897..d2c87526 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -174,10 +174,12 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, if (mp == NULL) return NULL; - rte_errno = rte_mempool_set_ops_byname(mp, - RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL); - if (rte_errno != 0) { + ret = rte_mempool_set_ops_byname(mp, + RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL); + if (ret != 0) { RTE_LOG(ERR, MBUF, "error setting mempool handler\n"); + rte_mempool_free(mp); + rte_errno = -ret; return NULL; } rte_pktmbuf_pool_init(mp, &mbp_priv); |