mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[host] free capture interface on exit
This is needed for proper cleanup. Freeing the capture interface also avoids a crash when using the NvFBC backend. This is because we moved the mouse hook removal to nvfbc_free. If nvfbc_free is not called before we start freeing LGMP memory, the mouse hook would end up writing the cursor position into an invalid memory address, causing an access violation.
This commit is contained in:
parent
952f50eb8c
commit
54da11a206
@ -566,8 +566,6 @@ int app_main(int argc, char * argv[])
|
||||
DEBUG_ERROR("Failed to create the LGMP timer");
|
||||
|
||||
iface->deinit();
|
||||
iface->free();
|
||||
|
||||
goto fail_timer;
|
||||
}
|
||||
|
||||
@ -685,6 +683,7 @@ fail_capture:
|
||||
lgTimerDestroy(app.lgmpTimer);
|
||||
|
||||
fail_timer:
|
||||
iface->free();
|
||||
LG_LOCK_FREE(app.pointerLock);
|
||||
|
||||
fail_lgmp:
|
||||
|
Loading…
Reference in New Issue
Block a user