You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/12/23 00:33:47 UTC
[trafficserver] branch master updated: coverity 1374999: Resource
leak
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 68dd4e3 coverity 1374999: Resource leak
68dd4e3 is described below
commit 68dd4e3cf89de6b94a7b9c53538777bccc192857
Author: Bryan Call <bc...@apache.org>
AuthorDate: Thu Dec 21 16:06:14 2017 -0800
coverity 1374999: Resource leak
---
.../stale_while_revalidate/stale_while_revalidate.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/plugins/experimental/stale_while_revalidate/stale_while_revalidate.c b/plugins/experimental/stale_while_revalidate/stale_while_revalidate.c
index e22da83..150275a 100644
--- a/plugins/experimental/stale_while_revalidate/stale_while_revalidate.c
+++ b/plugins/experimental/stale_while_revalidate/stale_while_revalidate.c
@@ -706,18 +706,18 @@ TSPluginInit(int argc, const char *argv[])
TSDebug(PLUGIN_NAME, "Plugin registration succeeded");
}
- plugin_config = TSmalloc(sizeof(config_t));
+ if (argc > 1) {
+ plugin_config = TSmalloc(sizeof(config_t));
- plugin_config->troot = NULL;
- plugin_config->troot_mutex = TSMutexCreate();
- plugin_config->stale_if_error_override = 0;
- plugin_config->log_info.object = NULL;
- plugin_config->log_info.all = false;
- plugin_config->log_info.stale_if_error = false;
- plugin_config->log_info.stale_while_revalidate = false;
- plugin_config->log_info.filename = PLUGIN_NAME;
+ plugin_config->troot = NULL;
+ plugin_config->troot_mutex = TSMutexCreate();
+ plugin_config->stale_if_error_override = 0;
+ plugin_config->log_info.object = NULL;
+ plugin_config->log_info.all = false;
+ plugin_config->log_info.stale_if_error = false;
+ plugin_config->log_info.stale_while_revalidate = false;
+ plugin_config->log_info.filename = PLUGIN_NAME;
- if (argc > 1) {
int c;
static const struct option longopts[] = {{"log-all", no_argument, NULL, 'a'},
{"log-stale-while-revalidate", no_argument, NULL, 'r'},
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].