projects
/
ccan
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
opt: Add a function to free the internal memory.
[ccan]
/
ccan
/
opt
/
opt.c
diff --git
a/ccan/opt/opt.c
b/ccan/opt/opt.c
index 8f67740036e7e5c5ac53bb3c2abe8d5a9ccc7fce..f05d125fc828dda1e647a49788d5ccb1ac5b5d05 100644
(file)
--- a/
ccan/opt/opt.c
+++ b/
ccan/opt/opt.c
@@
-201,6
+201,12
@@
bool opt_parse(int *argc, char *argv[], void (*errlog)(const char *fmt, ...))
return (ret == 0);
}
+void opt_free_table(void)
+{
+ free(opt_table);
+ opt_table=0;
+}
+
void opt_log_stderr(const char *fmt, ...)
{
va_list ap;