From 61cdde54f4d4f1490bfb9c6452c5aef33355c2a7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 13 Sep 2024 19:37:07 +0200 Subject: Fix memory corruption buf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- anysum.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'anysum.c') diff --git a/anysum.c b/anysum.c index de85e46..09ada8d 100644 --- a/anysum.c +++ b/anysum.c @@ -83,11 +83,12 @@ main(int argc, char **argv) struct config config = {.format = LOWERCASE_HEX | WITH_FILENAME | WITH_LF}; char stdin_str[] = "-"; char *stdin_array[] = {stdin_str, NULL}; + char *algostrbuf = NULL; size_t i; int ret; libsimple_default_failure_exit = 2; - cmdline(&argc, &argv, &config); + cmdline(&argc, &argv, &config, &algostrbuf); if (!*argv) argv = stdin_array; @@ -114,5 +115,6 @@ main(int argc, char **argv) for (i = 0; i < config.nalgorithms; i++) free(config.algorithms[i].result); free(config.algorithms); + free(algostrbuf); return ret; } -- cgit v1.2.3-70-g09d2