wmclockmon: check whether memory has been allocated before freeing.
commit7f042fb7959f69cfded6c61e098653d086e1d2cd
authorDoug Torrance <dtorrance@piedmont.edu>
Sun, 19 May 2024 16:24:14 +0000 (19 17:24 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 19 May 2024 17:12:02 +0000 (19 18:12 +0100)
treef6539cba5d7133553c67fbbb5b28b385b2381cdc
parentfee3bd0d276c97942a3cd042782b5005663e800c
wmclockmon: check whether memory has been allocated before freeing.

Two strings, command and light_color, were always freed even though they
were only conditionally allocated.  This could cause "munmap_chunk(): invalid
pointer" errors.  We fix this by keeping track of whether they have been
allocated and only freeing if they have.
wmclockmon/wmclockmon-config/actions.c
wmclockmon/wmclockmon-config/tools.c
wmclockmon/wmclockmon-config/variables.h