Skip to content
Permalink
Browse files
Merge pull request #6412 from leoetlino/oops
IOS: Fix invalid FD being returned after an open
  • Loading branch information
JosJuice committed Feb 28, 2018
2 parents bf825e6 + 4e014f9 commit 82b87b0
Showing 1 changed file with 4 additions and 1 deletion.
@@ -500,9 +500,12 @@ IPCCommandResult Kernel::OpenDevice(OpenRequest& request)
return Device::Device::GetDefaultReply(IPC_ENOENT);
}

const IPCCommandResult result = device->Open(request);
IPCCommandResult result = device->Open(request);
if (result.return_value >= IPC_SUCCESS)
{
m_fdmap[new_fd] = device;
result.return_value = new_fd;
}
return result;
}

0 comments on commit 82b87b0

Please sign in to comment.