aboutsummaryrefslogtreecommitdiff
path: root/lib/args.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/args.c')
-rw-r--r--lib/args.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/args.c b/lib/args.c
index f4ceba1e..e3dcb26e 100644
--- a/lib/args.c
+++ b/lib/args.c
@@ -413,4 +413,9 @@ notflag:
if (toys.optc>gof.maxargs)
error_exit("Max %d argument%s", gof.maxargs, letters[!(gof.maxargs-1)]);
if (CFG_HELP) toys.exithelp = 0;
+
+ if (CFG_TOYBOX_FREE) {
+ llist_traverse(gof.opts, free);
+ llist_traverse(gof.longopts, free);
+ }
}