diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-08-21 20:57:53 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-08-21 20:57:53 +0000 |
commit | ec2fd8915b25a6b193340ed00b395bd2307dfba2 (patch) | |
tree | bb405298157b21e9cf4ef3004b5fd146341f1a78 /usr.bin/tmux/arguments.c | |
parent | 13d49b79b62ee0fc9c88b94430200dda48dd79bc (diff) |
Free value properly.
Diffstat (limited to 'usr.bin/tmux/arguments.c')
-rw-r--r-- | usr.bin/tmux/arguments.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/arguments.c b/usr.bin/tmux/arguments.c index ea6bf9c674d..f4c1e1fc4b7 100644 --- a/usr.bin/tmux/arguments.c +++ b/usr.bin/tmux/arguments.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arguments.c,v 1.43 2021/08/21 20:46:43 nicm Exp $ */ +/* $OpenBSD: arguments.c,v 1.44 2021/08/21 20:57:52 nicm Exp $ */ /* * Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -39,7 +39,7 @@ struct args_entry { }; struct args { - struct args_tree tree; + struct args_tree tree; u_int count; struct args_value *values; }; @@ -231,7 +231,7 @@ args_free(struct args *args) RB_REMOVE(args_tree, &args->tree, entry); TAILQ_FOREACH_SAFE(value, &entry->values, entry, value1) { TAILQ_REMOVE(&entry->values, value, entry); - free(value->string); + args_free_value(value); free(value); } free(entry); @@ -472,7 +472,7 @@ args_value(struct args *args, u_int idx) const char * args_string(struct args *args, u_int idx) { - if (idx >= (u_int)args->count) + if (idx >= args->count) return (NULL); return (args_value_as_string(&args->values[idx])); } |