Skip to content

Commit

Permalink
fix(linux): InitLinuxKeybord() memory leak bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Feb 16, 2020
1 parent 44486f1 commit 61cadc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/linux/linux_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ static void LinuxKeybnoardThread(void *arg)
int key;
LCUI_TaskRec task = { 0 };

keyboard.active = TRUE;
task.func = DispatchKeyboardEvent;
task.destroy_arg[0] = free;
while (keyboard.active) {
Expand Down Expand Up @@ -248,6 +247,7 @@ static int InitLinuxKeybord(void)
for (; i < len; ++i) {
signal(signals[i], on_signal);
}
keyboard.active = TRUE;
LCUIThread_Create(&keyboard.tid, LinuxKeybnoardThread, NULL);
Logger_Debug("[input] keyboard driver thread: %lld\n", keyboard.tid);
return 0;
Expand Down

0 comments on commit 61cadc8

Please sign in to comment.