libgrapheme

unicode string library
git clone git://git.suckless.org/libgrapheme
Log | Files | Refs | README | LICENSE

commit a1913f83b643e883aa6754d8078aee7d46f53aec
parent decd5b53f1f1303d1f351e85238cad4987b8b6f0
Author: Laslo Hunhold <dev@frign.de>
Date:   Sat,  8 Oct 2022 13:17:16 +0200

Avoid memory leak in break_test_list_free()

Signed-off-by: Laslo Hunhold <dev@frign.de>

Diffstat:
Mgen/util.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gen/util.c b/gen/util.c @@ -692,7 +692,13 @@ break_test_list_print(const struct break_test *test, size_t testlen, void break_test_list_free(struct break_test *test, size_t testlen) { - (void)testlen; + size_t i; + + for (i = 0; i < testlen; i++) { + free(test[i].cp); + free(test[i].len); + free(test[i].descr); + } free(test); }