aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_eal/common/eal_common_memzone.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-03-07 11:25:34 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2018-03-07 11:25:37 +0000
commit5a20dffc01e9483dfe8d901d734dc40cd8a0d6c5 (patch)
treeb35070c2321ef0ef5a2e446484818cc88e1b4957 /lib/librte_eal/common/eal_common_memzone.c
parent5b3db0f8f1ad5ba2152d977ccd3825ea05e863a2 (diff)
parentc3f15def2ebe9cc255cf0e5cf32aa171f5b4326d (diff)
Merge tag 'upstream/17.11.1' into 17.11.x
Upstream version 17.11.1 Change-Id: Ic4947a43032110f3070932a25db1d80b7abf6705 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'lib/librte_eal/common/eal_common_memzone.c')
-rw-r--r--lib/librte_eal/common/eal_common_memzone.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c
index ea072a25..b682b005 100644
--- a/lib/librte_eal/common/eal_common_memzone.c
+++ b/lib/librte_eal/common/eal_common_memzone.c
@@ -237,7 +237,7 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,
return NULL;
}
- const struct malloc_elem *elem = malloc_elem_from_data(mz_addr);
+ struct malloc_elem *elem = malloc_elem_from_data(mz_addr);
/* fill the zone in config */
mz = get_next_free_memzone();
@@ -245,6 +245,7 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,
if (mz == NULL) {
RTE_LOG(ERR, EAL, "%s(): Cannot find free memzone but there is room "
"in config!\n", __func__);
+ malloc_elem_free(elem);
rte_errno = ENOSPC;
return NULL;
}