Mercurial > molko
changeset 476:00b30f899548
core: make sure mlk_action_script is zero'ed on finalization
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 27 Feb 2023 12:45:21 +0100 |
parents | 1a1265445157 |
children | 66e7f5fa7b78 |
files | libmlk-core/mlk/core/action-script.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmlk-core/mlk/core/action-script.c Mon Feb 27 12:44:13 2023 +0100 +++ b/libmlk-core/mlk/core/action-script.c Mon Feb 27 12:45:21 2023 +0100 @@ -63,9 +63,9 @@ assert(s); assert(ev); - struct mlk_action *a = current(s); + struct mlk_action *a; - if (a) + if ((a = current(s))) mlk_action_handle(a, ev); } @@ -114,4 +114,6 @@ for (size_t i = 0; i < s->size; ++i) mlk_action_finish(s->actions[i]); + + memset(s, 0, sizeof (*s)); }