aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-12-28 17:59:56 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-12-28 17:59:56 +0100
commitdf3d47a05cfaf97a51215f546f1912bf79735daa (patch)
tree9093a7fb38a4c2421a4d3514ab31c1e33a417144
parent94615b013bd6158862e85318ab8e3bb7cb77a659 (diff)
Remind user to call free()
-rw-r--r--cbs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/cbs.h b/cbs.h
index 872915b..25cc47b 100644
--- a/cbs.h
+++ b/cbs.h
@@ -59,7 +59,9 @@
/* Struct representing a CLI command that various functions act on. You will
basically always want to zero-initialize variables of this type before use.
- */
+
+ After adding arguments to this command via cmdadd() and cmdaddv(), make sure
+ to free() the .argv field BEFORE calling cmdclr(). */
struct cmd {
char **argv;
size_t len, cap;