hle: kernel: k_port: Use AcceptSession to ensure SessionList state is correct.
- Fixes a use-after-free, work-around until we fixup session/port management.
This commit is contained in:
parent
b4fc2e52a2
commit
e33ffdc555
@ -56,8 +56,8 @@ ResultCode KPort::EnqueueSession(KServerSession* session) {
|
|||||||
|
|
||||||
R_UNLESS(state == State::Normal, ResultPortClosed);
|
R_UNLESS(state == State::Normal, ResultPortClosed);
|
||||||
|
|
||||||
server.GetSessionRequestHandler()->ClientConnected(session);
|
|
||||||
server.EnqueueSession(session);
|
server.EnqueueSession(session);
|
||||||
|
server.GetSessionRequestHandler()->ClientConnected(server.AcceptSession());
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user