Skip to content
Commit ff8017c4 authored by Tobias Stoeckmann's avatar Tobias Stoeckmann Committed by Zbigniew Jędrzejewski-Szmek
Browse files

Never call unmap with MAP_FAILED. (#5590)



When mmap is called, the code in correctly checks for p == MAP_FAILED.

But the resource cleanup at the end of busname_peek_message checks for
p == NULL, and if that's not true, munmap is called.

Therefore in error case, munmap is called with a MAP_FAILED argument
which can result in unexpected behaviour depending on sz's value.

Signed-off-by: default avatarTobias Stoeckmann <tobias@stoeckmann.org>
parent 6f94e420
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment