fix a leak, get a double free

This commit is contained in:
Khaïs COLIN 2024-11-01 12:26:07 +01:00
parent 179f4b3edf
commit 9725166235
2 changed files with 31 additions and 1 deletions

9
check_failure.sh Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -xuo pipefail
for FAIL_AFTER in `seq 1 1000`
do
cc -ggdb -Wall -Wextra -Werror -D FAIL_AFTER=$FAIL_AFTER *.c
valgrind -q --leak-check=full ./a.out get_next_line.c
done