mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 00:16:22 +01:00
Fix a use-after-free error in switch binding
This commit is contained in:
parent
2bece94b9b
commit
c0bce9138b
1 changed files with 1 additions and 1 deletions
|
@ -608,7 +608,7 @@ void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memcpy(deferred, binding, sizeof(struct sway_binding));
|
memcpy(deferred, binding, sizeof(struct sway_binding));
|
||||||
deferred->command = strdup(binding->command);
|
deferred->command = binding->command ? strdup(binding->command) : NULL;
|
||||||
list_add(seat->deferred_bindings, deferred);
|
list_add(seat->deferred_bindings, deferred);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue