1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

Kernel: Fix bogus negation of alloc_fd() error in sys$anon_create()

Thanks to Idan for spotting this!
This commit is contained in:
Andreas Kling 2021-01-15 15:13:17 +01:00
parent 12879184ce
commit a525d0271c

View file

@ -38,7 +38,7 @@ int Process::sys$anon_create(size_t size, int options)
int new_fd = alloc_fd();
if (new_fd < 0)
return -new_fd;
return new_fd;
auto vmobject = AnonymousVMObject::create_with_size(size, AllocationStrategy::Reserve);
if (!vmobject)