From 241a587e61706321a7f8767d90aaf9876037c2eb Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 23 Jan 2022 12:31:05 +0100 Subject: [PATCH] Fix missing HID mouse destructor call The destructor unregisters the HID mouse, so it was not reported as a leak, but it must still be called. --- app/src/scrcpy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index 92521f45..5f4455ba 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -598,6 +598,9 @@ end: if (hid_keyboard_initialized) { sc_hid_keyboard_destroy(&s->keyboard_hid); } + if (hid_mouse_initialized) { + sc_hid_mouse_destroy(&s->mouse_hid); + } sc_aoa_stop(&s->aoa); } if (acksync) {