diff --git a/ChangeLog b/ChangeLog index a3e725b05a..99afc39072 100644 --- a/ChangeLog +++ b/ChangeLog @@ -296,6 +296,9 @@ Changes in Version 0.2.1.21 - 20??-??-?? documents that are older than the latest consensus. This bug might have degraded client bootstrapping. Bugfix on 0.2.0.10-alpha. Spotted and fixed by xmux. + - Fix a couple of very-hard-to-trigger memory leaks, and one hard-to- + trigger platform-specific option misparsing case found by Coverity + Scan. Changes in version 0.2.1.20 - 2009-10-15 diff --git a/src/or/config.c b/src/or/config.c index df346081a8..5a0ced29d5 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -2254,6 +2254,7 @@ option_clear(config_format_t *fmt, or_options_t *options, config_var_t *var) break; case CONFIG_TYPE_ISOTIME: *(time_t*)lvalue = 0; + break; case CONFIG_TYPE_INTERVAL: case CONFIG_TYPE_UINT: case CONFIG_TYPE_BOOL: @@ -2267,6 +2268,7 @@ option_clear(config_format_t *fmt, or_options_t *options, config_var_t *var) routerset_free(*(routerset_t**)lvalue); *(routerset_t**)lvalue = NULL; } + break; case CONFIG_TYPE_CSV: if (*(smartlist_t**)lvalue) { SMARTLIST_FOREACH(*(smartlist_t **)lvalue, char *, cp, tor_free(cp)); diff --git a/src/or/control.c b/src/or/control.c index 554aef6b25..0f744f7b96 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1456,6 +1456,7 @@ getinfo_helper_dir(control_connection_t *control_conn, if (res) { log_warn(LD_CONTROL, "getinfo '%s': %s", question, msg); smartlist_free(descs); + tor_free(url); return -1; } SMARTLIST_FOREACH(descs, signed_descriptor_t *, sd, diff --git a/src/or/router.c b/src/or/router.c index 85abc8c5fb..145301cd0c 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -590,6 +590,7 @@ init_keys(void) if (write_str_to_file(keydir, fingerprint_line, 0)) { log_err(LD_FS, "Error writing fingerprint line to file"); tor_free(keydir); + tor_free(cp); return -1; } }