Repository: trafficserver Updated Branches: refs/heads/master 28aac2121 -> 29521feca
TS-1475: Fix leak in error case. Coverity #1196457 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/29521fec Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/29521fec Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/29521fec Branch: refs/heads/master Commit: 29521feca575dea90c27928e01f840d0d71ec11a Parents: 28aac21 Author: Brian Geffon <bri...@apache.org> Authored: Mon Jul 14 14:10:10 2014 -0700 Committer: Brian Geffon <bri...@apache.org> Committed: Mon Jul 14 14:10:10 2014 -0700 ---------------------------------------------------------------------- proxy/http/remap/RemapConfig.cc | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/29521fec/proxy/http/remap/RemapConfig.cc ---------------------------------------------------------------------- diff --git a/proxy/http/remap/RemapConfig.cc b/proxy/http/remap/RemapConfig.cc index 70fdbb7..e09531b 100644 --- a/proxy/http/remap/RemapConfig.cc +++ b/proxy/http/remap/RemapConfig.cc @@ -892,6 +892,8 @@ remap_parse_config_bti(const char * path, BUILD_TABLE_INFO * bti) Debug("url_rewrite", "[BuildTable] UrlRewrite::BuildTable()"); for (cur_line = tokLine(file_buf, &tok_state, '\\'); cur_line != NULL;) { + reg_map = NULL; + new_mapping = NULL; errStrBuf[0] = 0; bti->reset(); @@ -1246,6 +1248,8 @@ remap_parse_config_bti(const char * path, BUILD_TABLE_INFO * bti) Warning("Could not add rule at line #%d; Aborting!", cln + 1); snprintf(errBuf, sizeof(errBuf), "%s %s at line %d", modulePrefix, errStr, cln + 1); SignalError(errBuf, alarm_already); + delete reg_map; + delete new_mapping; return false; } /* end of while(cur_line != NULL) */