]> git.ozlabs.org Git - ccan/blobdiff - ccan/opt/opt.c
opt: Add a function to free the internal memory.
[ccan] / ccan / opt / opt.c
index 8f67740036e7e5c5ac53bb3c2abe8d5a9ccc7fce..f05d125fc828dda1e647a49788d5ccb1ac5b5d05 100644 (file)
@@ -201,6 +201,12 @@ bool opt_parse(int *argc, char *argv[], void (*errlog)(const char *fmt, ...))
        return (ret == 0);
 }
 
        return (ret == 0);
 }
 
+void opt_free_table(void)
+{
+       free(opt_table);
+       opt_table=0;
+}
+
 void opt_log_stderr(const char *fmt, ...)
 {
        va_list ap;
 void opt_log_stderr(const char *fmt, ...)
 {
        va_list ap;