Repository: trafficserver Updated Branches: refs/heads/master 488ba88a0 -> cb10484f3
Close the file handle before returning on errors. CID 1271022 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cb10484f Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cb10484f Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cb10484f Branch: refs/heads/master Commit: cb10484f337561d2d54c8ef1f75c5ce503bc9b29 Parents: 488ba88 Author: Leif Hedstrom <[email protected]> Authored: Tue Feb 24 14:23:00 2015 -0700 Committer: Leif Hedstrom <[email protected]> Committed: Tue Feb 24 14:23:00 2015 -0700 ---------------------------------------------------------------------- plugins/cacheurl/cacheurl.cc | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb10484f/plugins/cacheurl/cacheurl.cc ---------------------------------------------------------------------- diff --git a/plugins/cacheurl/cacheurl.cc b/plugins/cacheurl/cacheurl.cc index bd80257..99daa01 100644 --- a/plugins/cacheurl/cacheurl.cc +++ b/plugins/cacheurl/cacheurl.cc @@ -258,6 +258,7 @@ load_config_file(const char *config_file) } if (!spstart) { TSError("[%s] ERROR: Invalid format on line %d. Skipping\n", PLUGIN_NAME, lineno); + TSfclose(fh); return NULL; } /* Find part of the line after any whitespace */ @@ -268,6 +269,7 @@ load_config_file(const char *config_file) if (*spend == 0) { /* We reached the end of the string without any non-whitepace */ TSError("[%s] ERROR: Invalid format on line %d. Skipping\n", PLUGIN_NAME, lineno); + TSfclose(fh); return NULL; } @@ -279,6 +281,7 @@ load_config_file(const char *config_file) retval = regex_compile(&info, buffer, spend); if (!retval) { TSError("[%s] Error precompiling regex/replacement. Skipping.\n", PLUGIN_NAME); + TSfclose(fh); return NULL; }
