Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 16.11.5
[deb_dpdk.git]
/
lib
/
librte_eal
/
common
/
eal_common_memzone.c
diff --git
a/lib/librte_eal/common/eal_common_memzone.c
b/lib/librte_eal/common/eal_common_memzone.c
index
64f4e0a
..
b58d85b
100644
(file)
--- a/
lib/librte_eal/common/eal_common_memzone.c
+++ b/
lib/librte_eal/common/eal_common_memzone.c
@@
-236,7
+236,7
@@
memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,
return NULL;
}
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();
/* fill the zone in config */
mz = get_next_free_memzone();
@@
-244,6
+244,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__);
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;
}
rte_errno = ENOSPC;
return NULL;
}