Skip to content

fix: destroy client handles before the mpv core in Destroy()#789

Open
Noethix55555 wants to merge 1 commit into
mpvnet-player:mainfrom
Noethix55555:fix/destroy-handle-order
Open

fix: destroy client handles before the mpv core in Destroy()#789
Noethix55555 wants to merge 1 commit into
mpvnet-player:mainfrom
Noethix55555:fix/destroy-handle-order

Conversation

@Noethix55555

Copy link
Copy Markdown

Destroy() called mpv_destroy(MainHandle) (the core) before mpv_destroy(Handle) (the client handle created by mpv_create_client). Destroying the core first leaves the client handle pointing at freed memory; the subsequent mpv_destroy(Handle) is a use-after-destroy.

Reordered so the client handle (and any extra clients in Clients) are destroyed first, then the core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant