Merge commit 'origin/maint-0.2.1'

This commit is contained in:
Nick Mathewson 2009-10-26 22:40:24 -04:00
commit 8519d36633
4 changed files with 7 additions and 0 deletions

View File

@ -296,6 +296,9 @@ Changes in Version 0.2.1.21 - 20??-??-??
documents that are older than the latest consensus. This bug might documents that are older than the latest consensus. This bug might
have degraded client bootstrapping. Bugfix on 0.2.0.10-alpha. have degraded client bootstrapping. Bugfix on 0.2.0.10-alpha.
Spotted and fixed by xmux. 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 Changes in version 0.2.1.20 - 2009-10-15

View File

@ -2254,6 +2254,7 @@ option_clear(config_format_t *fmt, or_options_t *options, config_var_t *var)
break; break;
case CONFIG_TYPE_ISOTIME: case CONFIG_TYPE_ISOTIME:
*(time_t*)lvalue = 0; *(time_t*)lvalue = 0;
break;
case CONFIG_TYPE_INTERVAL: case CONFIG_TYPE_INTERVAL:
case CONFIG_TYPE_UINT: case CONFIG_TYPE_UINT:
case CONFIG_TYPE_BOOL: 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_free(*(routerset_t**)lvalue);
*(routerset_t**)lvalue = NULL; *(routerset_t**)lvalue = NULL;
} }
break;
case CONFIG_TYPE_CSV: case CONFIG_TYPE_CSV:
if (*(smartlist_t**)lvalue) { if (*(smartlist_t**)lvalue) {
SMARTLIST_FOREACH(*(smartlist_t **)lvalue, char *, cp, tor_free(cp)); SMARTLIST_FOREACH(*(smartlist_t **)lvalue, char *, cp, tor_free(cp));

View File

@ -1456,6 +1456,7 @@ getinfo_helper_dir(control_connection_t *control_conn,
if (res) { if (res) {
log_warn(LD_CONTROL, "getinfo '%s': %s", question, msg); log_warn(LD_CONTROL, "getinfo '%s': %s", question, msg);
smartlist_free(descs); smartlist_free(descs);
tor_free(url);
return -1; return -1;
} }
SMARTLIST_FOREACH(descs, signed_descriptor_t *, sd, SMARTLIST_FOREACH(descs, signed_descriptor_t *, sd,

View File

@ -590,6 +590,7 @@ init_keys(void)
if (write_str_to_file(keydir, fingerprint_line, 0)) { if (write_str_to_file(keydir, fingerprint_line, 0)) {
log_err(LD_FS, "Error writing fingerprint line to file"); log_err(LD_FS, "Error writing fingerprint line to file");
tor_free(keydir); tor_free(keydir);
tor_free(cp);
return -1; return -1;
} }
} }