wmclockmon: properly fix allocating and freeing of `command`, `light_color` and the...
commitf6f51aa00364c56326e16834cb38e990b2daaa83
authorJeremy Sowden <azazel@debian.org>
Tue, 21 May 2024 10:29:54 +0000 (21 11:29 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 21 May 2024 10:46:23 +0000 (21 11:46 +0100)
treec96b0a9293923d755c8d00160cc42e794959936d
parent871fabdf3b64c67689a4bb65d617c67d14e92de4
wmclockmon: properly fix allocating and freeing of `command`, `light_color` and the other GtkEntry strings

Instead of sometimes allocating memory and sometimes storing the values return
by `gtk_entry_get_text()`, always storing allocated memory and unconditionally
free it.

Do this for all the entry strings.

Fixes: 7f042fb7959f ("wmclockmon: check whether memory has been allocated before freeing.")
Signed-off-by: Jeremy Sowden <azazel@debian.org>
wmclockmon/wmclockmon-config/actions.c
wmclockmon/wmclockmon-config/tools.c