summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2022-02-23 23:10:27 +0200
committerSergey Poznyakoff <gray@gnu.org>2022-02-23 23:10:27 +0200
commitb5b8acfd30a8628061049757bb756e5714eedbcd (patch)
tree955c0d161f5a51a28bdb489222e8cd5181496d23
parentc286e0b3f686d36b623e70a5ea1830381b08ab0d (diff)
downloadgdbm-b5b8acfd30a8628061049757bb756e5714eedbcd.tar.gz
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.
-rw-r--r--tools/parseopt.c3
1 files changed, 0 insertions, 3 deletions
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;
}