Commit 50cde7c9 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline

MemBuffer: check munmap return value

parent 8c440f39
Pipeline #10018 passed with stages
in 9 minutes and 47 seconds
......@@ -185,7 +185,9 @@ void MemBuffer::Allocator::release(MemBuffer& buffer)
#ifdef __unix
if (useMmap(size)) {
int real_size = getPageAlignedSize(size);
munmap(ptr, real_size);
if (munmap(ptr, real_size) != 0)
throw LIMA_COM_EXC(Error, "Error in munmap: ")
<< strerror(errno);
} else {
free(ptr);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment