commit b5b8acfd30a8628061049757bb756e5714eedbcd Author: Sergey Poznyakoff Date: Wed Feb 23 23:10:27 2022 +0200 Bugfix * tools/parseopt.c (parseopt_next): Don't call parseopt_free. This triggered coredumps if, e.g. parseopt_print_help() got called after parsing the arguments. The bug was introduced by 203601fb06 in an attempt to pacify valgrind an similar tools. diff --git a/tools/parseopt.c b/tools/parseopt.c index 2d646ff..19a6576 100644 --- a/tools/parseopt.c +++ b/tools/parseopt.c @@ -709,8 +709,5 @@ parseopt_next (void) } while (handle_option (rc)); - if (rc == EOF || rc == '?') - parseopt_free (); - return rc; }