From df3d47a05cfaf97a51215f546f1912bf79735daa Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 28 Dec 2023 17:59:56 +0100 Subject: Remind user to call free() --- cbs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3