aboutsummaryrefslogtreecommitdiff
path: root/tools/gsr-global-hotkeys
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-12-28 22:35:55 +0100
committerdec05eba <dec05eba@protonmail.com>2024-12-28 22:35:55 +0100
commit5b7b8f8f8c89f8754458916870d63353a4e46f09 (patch)
treedeb7c6af4b568fd00eafa23cb4c0271c239de612 /tools/gsr-global-hotkeys
parentc213b5de89ee4a11d1c6c94b8b142b24885a4323 (diff)
Global hotkeys: fix incorrect free
Diffstat (limited to 'tools/gsr-global-hotkeys')
-rw-r--r--tools/gsr-global-hotkeys/keyboard_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gsr-global-hotkeys/keyboard_event.c b/tools/gsr-global-hotkeys/keyboard_event.c
index ef8f6ef..63aeeef 100644
--- a/tools/gsr-global-hotkeys/keyboard_event.c
+++ b/tools/gsr-global-hotkeys/keyboard_event.c
@@ -305,10 +305,10 @@ static void keyboard_event_remove_event(keyboard_event *self, int index) {
ioctl(self->event_polls[index].fd, EVIOCGRAB, 0);
close(self->event_polls[index].fd);
+ free(self->event_extra_data[index].key_states);
for(int i = index + 1; i < self->num_event_polls; ++i) {
self->event_polls[i - 1] = self->event_polls[i];
- free(self->event_extra_data[i - 1].key_states);
self->event_extra_data[i - 1] = self->event_extra_data[i];
}
--self->num_event_polls;