git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fbarray: check sysconf failure
[dpdk.git]
/
lib
/
librte_eal
/
common
/
eal_common_fbarray.c
diff --git
a/lib/librte_eal/common/eal_common_fbarray.c
b/lib/librte_eal/common/eal_common_fbarray.c
index
d17611b
..
019f84c
100644
(file)
--- a/
lib/librte_eal/common/eal_common_fbarray.c
+++ b/
lib/librte_eal/common/eal_common_fbarray.c
@@
-572,6
+572,9
@@
rte_fbarray_detach(struct rte_fbarray *arr)
size_t page_sz = sysconf(_SC_PAGESIZE);
+ if (page_sz == (size_t)-1)
+ return -1;
+
/* this may already be unmapped (e.g. repeated call from previously
* failed destroy(), but this is on user, we can't (easily) know if this
* is still mapped.