Skip to content

fix: close fd on mmap failure in CreateShmBuffer#2095

Open
MrMartyK wants to merge 1 commit intoValveSoftware:masterfrom
MrMartyK:fix/fd-leak-createshmbuffer
Open

fix: close fd on mmap failure in CreateShmBuffer#2095
MrMartyK wants to merge 1 commit intoValveSoftware:masterfrom
MrMartyK:fix/fd-leak-createshmbuffer

Conversation

@MrMartyK
Copy link

The ftruncate error path closes the fd, but the mmap error path doesn't. This leaks the fd (and the backing tmpfs pages, since the file is already unlinked).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant