Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
418ebb7
)
vppinfra: fix coverity issue 205691 in pmalloc
98/23498/3
author
Andrew Yourtchenko
<ayourtch@gmail.com>
Mon, 18 Nov 2019 10:23:54 +0000
(10:23 +0000)
committer
Dave Barach
<openvpp@barachs.net>
Fri, 22 Nov 2019 17:38:15 +0000
(17:38 +0000)
set the address to MMAP_FAILED if mmap has failed,
so that we do not attempt to free it in the error
handling path.
Change-Id: I6e6b51a365fb68086dc20aa40a676a36af59a3ba
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
src/vppinfra/pmalloc.c
patch
|
blob
|
history
diff --git
a/src/vppinfra/pmalloc.c
b/src/vppinfra/pmalloc.c
index
ce78ca0
..
cca8039
100644
(file)
--- a/
src/vppinfra/pmalloc.c
+++ b/
src/vppinfra/pmalloc.c
@@
-331,6
+331,7
@@
pmalloc_map_pages (clib_pmalloc_main_t * pm, clib_pmalloc_arena_t * a,
pm->error = clib_error_return_unix (0, "failed to mmap %u pages at %p "
"fd %d numa %d flags 0x%x", n_pages,
va, a->fd, numa_node, mmap_flags);
+ va = MAP_FAILED;
goto error;
}