Rémi Bernon (@rbernon) commented about dlls/mf/session.c:
/* Checking this flag is unnecessary if this function is only called * from the callback or upon release, but do it for consistency and * in case a call from elsewhere is added. */
if (op->submitted)
- BOOL submitted = session->command_state == COMMAND_STATE_SUBMITTED;
- LIST_FOR_EACH_ENTRY_SAFE(op, op2, &session->commands, struct session_op, entry)
- {
if (submitted)
{
submitted = FALSE; continue;
}} list_remove(&op->entry); IUnknown_Release(&op->IUnknown_iface);
```suggestion:-11+0 LIST_FOR_EACH_ENTRY_SAFE(op, op2, &session->commands, struct session_op, entry) { list_remove(&op->entry); IUnknown_Release(&op->IUnknown_iface); } ```
This isn't necessary, `session_clear_command_list` is only called on last release or on `SESSION_CMD_SHUTDOWN`. In the former case it's not possible to have any submitted command, and in the latter the submitted command should've removed from the list already from `session_commands_callback_Invoke`.