netstar pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=73f68ae183c3ae835418b87c079ceb033b7768e6
commit 73f68ae183c3ae835418b87c079ceb033b7768e6 Author: Al Poole <nets...@gmail.com> Date: Sat Mar 10 11:20:42 2018 +0000 efreet_xml: make certain we unmap the right pointer. This resolves all sorts of issues on FreeBSD and OpenBSD. Linux and valgrind seems to not detect these mmap/munmap problems. @fix T5949 --- src/lib/efreet/efreet_xml.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/efreet/efreet_xml.c b/src/lib/efreet/efreet_xml.c index 05261b2a4a..4f4cd2fea8 100644 --- a/src/lib/efreet/efreet_xml.c +++ b/src/lib/efreet/efreet_xml.c @@ -86,7 +86,7 @@ efreet_xml_new(const char *file) { Efreet_Xml *xml = NULL; int size, fd = -1; - char *data = MAP_FAILED; + char *tmp, *data = MAP_FAILED; struct stat st; int error = 0; @@ -109,11 +109,12 @@ efreet_xml_new(const char *file) data = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); if (data == MAP_FAILED) goto efreet_error; + tmp = data; + error = 0; size = st.st_size; - xml = efreet_xml_parse(&data, &size, &error); + xml = efreet_xml_parse(&tmp, &size, &error); if (!xml || error) goto efreet_error; - munmap(data, st.st_size); close(fd); return xml; --