# HG changeset patch # User Binki # Date 2009-04-18 23:22:45 # Node ID 987bb8883080e26b9d5339ce3cfb6ab7cb0dfed4 # Parent 4f90c21755ee11158d85aa8b3422c0f8bbb905d9 options: added notes for future work diff --git a/src/common/options.c b/src/common/options.c --- a/src/common/options.c +++ b/src/common/options.c @@ -68,7 +68,10 @@ int options_init(int argc, char *argv[], { CFG_END() }; - + + /* + In these arrays, I should replace NULL with a pointer to a string in the struct which should hold the result of confuse processing an option. This is partially because confuse will not free the values it parses. + */ cfg_opt_t server_opts[] = { CFG_STR("username", NULL, CFGF_NONE), @@ -121,6 +124,8 @@ int options_init(int argc, char *argv[], int options_free(struct options_common *opts) { + /* free the other common_options struct's members */ + cfg_free(opts->data->cfg); free(opts->data);