try with valgrind

This commit is contained in:
2025-11-05 21:35:37 +01:00
parent a5328f2bdd
commit 8b8f609c66
2 changed files with 3 additions and 6 deletions

View File

@@ -12,9 +12,10 @@ steps:
image: alpine:latest
commands:
- apk update
- apk add --no-cache bash build-base words-en gdb
- apk add --no-cache bash build-base words-en gdb valgrind
- make
- gdb -batch -ex "run" -ex "bt" --args dicepwgen
- valgrind --leak-check=full --show-reachable=yes ./dicepwgen
#- gdb -batch -ex "run" -ex "bt" --args dicepwgen
#- ./dicepwgen -y | grep -E '[a-z]*%'

View File

@@ -178,8 +178,4 @@ void getwords(char *dictfile, int count) {
for (i = 0; i < 66666; i++)
if (words[i] != NULL)
free(words[i]);
if (words != NULL) {
free(words);
}
}