diff options
author | Roger Dingledine <arma@torproject.org> | 2008-03-26 18:36:46 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-03-26 18:36:46 +0000 |
commit | 8dfccf6145dd63dc88e3a5862c2b53ac9aafd0d1 (patch) | |
tree | 069d7569fb2066409c1042cd3dbbe0fddabab47b /src/common/log.c | |
parent | e8cc756c132de678777f8439e13757890b9e90aa (diff) | |
download | tor-8dfccf6145dd63dc88e3a5862c2b53ac9aafd0d1.tar.gz tor-8dfccf6145dd63dc88e3a5862c2b53ac9aafd0d1.zip |
fix mem leak in parsing log config lines
svn:r14202
Diffstat (limited to 'src/common/log.c')
-rw-r--r-- | src/common/log.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/log.c b/src/common/log.c index 0aa78e4e28..c5be182209 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -839,9 +839,13 @@ parse_log_severity_config(const char **cfg_ptr, sev_lo = tor_strndup(cfg, space-cfg); sev_hi = tor_strdup("ERR"); } - if ((low = parse_log_level(sev_lo)) == -1) + low = parse_log_level(sev_lo); + high = parse_log_level(sev_hi); + tor_free(sev_lo); + tor_free(sev_hi); + if (low == -1) return -1; - if ((high = parse_log_level(sev_hi)) == -1) + if (high == -1) return -1; got_anything = 1; |