mpv.net icon indicating copy to clipboard operation
mpv.net copied to clipboard

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

Open Bolt4243 opened this issue 5 months ago • 0 comments

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.

Bolt4243 avatar Jun 18 '26 02:06 Bolt4243