fix: add mmap() error handling
fix: add mmap() error handling

Errors form mmap are silently ignored. A program libuio might access an
invalid memory which should result in a segfault (best case).

Now checking the returned pointer from mmap() for MAP_FAILED and cleanup
in case of an error.

Signed-off-by: Philipp Rosenberger <8a69707c447217e867295a14e80432324bef57cb@linutronix.de>
Signed-off-by: Manuel Traut <5b9fefc5e24c8c0032a4b1b435e37d15daf2b05f@linutronix.de>
Reviewed-by: Manuel Traut <5b9fefc5e24c8c0032a4b1b435e37d15daf2b05f@linutronix.de>

Linutronix/libuio,Linutronix/libuio