Introduction
Introduction Statistics Contact Development Disclaimer Help
Avoid memory leak in break_test_list_free() - libgrapheme - unicode string libr…
git clone git://git.suckless.org/libgrapheme
Log
Files
Refs
README
LICENSE
---
commit a1913f83b643e883aa6754d8078aee7d46f53aec
parent decd5b53f1f1303d1f351e85238cad4987b8b6f0
Author: Laslo Hunhold <[email protected]>
Date: Sat, 8 Oct 2022 13:17:16 +0200
Avoid memory leak in break_test_list_free()
Signed-off-by: Laslo Hunhold <[email protected]>
Diffstat:
M gen/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_…
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);
}
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.