mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
LibCore: Don't leak file descriptor inside AnonymousBuffer on Linux
This commit is contained in:
committed by
Andreas Kling
parent
dcff87215b
commit
c130161d9f
@@ -64,6 +64,7 @@ AnonymousBuffer AnonymousBuffer::create_with_size(size_t size)
|
||||
return {};
|
||||
}
|
||||
if (ftruncate(fd, size) < 0) {
|
||||
close(fd);
|
||||
perror("ftruncate");
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user