diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index c5bc65e..b81ce00 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -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]*%' diff --git a/dicepwgen.c b/dicepwgen.c index 9a157d0..e8b289f 100644 --- a/dicepwgen.c +++ b/dicepwgen.c @@ -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); - } }