]> git.mdlowis.com Git - proto/labwc.git/commit
ssd/ssd-shadow.c: fix memory leak
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 2 Jul 2024 18:49:53 +0000 (20:49 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 2 Jul 2024 19:34:25 +0000 (20:34 +0100)
commita466591e0dee4eb9eb2c7d653b56f1bc21606370
tree04924718f95c52e2b82058496ad56ebdb4cb5d78
parenta98f2635ea60e416891cbc381a1a3c0d6a3478de
ssd/ssd-shadow.c: fix memory leak

Before this patch, we were leaking memory [0] because the
shadow implementation did not free the ssd_parts on destruction.

There was also no check if shadows were actually enabled via
rc.xml or not so this also impacted people who were not using
shadows but were not setting the shadow size via their theme to 0.

[0] 44 bytes per ssd_part * 8 parts * 2 states == 704 bytes per
view closed. Note that Reconfigure also re-creates the SSD, thus
we were also leaking 704 bytes * nr_views per Reconfigure.
src/ssd/ssd-shadow.c