trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject trafficserver git commit: Close the file before returning. This probably could be cleaned up, but it's the current pattern.
Date Sat, 03 Jan 2015 20:53:42 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 4a3101658 -> 233727cda


Close the file before returning. This probably could be
cleaned up, but it's the current pattern.

Coverity CID #1214713


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/233727cd
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/233727cd
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/233727cd

Branch: refs/heads/master
Commit: 233727cda66b9b8b314fe44fd6eae349e9281c81
Parents: 4a31016
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Sat Jan 3 13:50:31 2015 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Sat Jan 3 13:50:31 2015 -0700

----------------------------------------------------------------------
 plugins/experimental/url_sig/url_sig.c | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/233727cd/plugins/experimental/url_sig/url_sig.c
----------------------------------------------------------------------
diff --git a/plugins/experimental/url_sig/url_sig.c b/plugins/experimental/url_sig/url_sig.c
index e063791..0adf23c 100644
--- a/plugins/experimental/url_sig/url_sig.c
+++ b/plugins/experimental/url_sig/url_sig.c
@@ -137,6 +137,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int
errbuf_s
         if (keynum > MAX_KEY_NUM || keynum == -1) {
           snprintf(errbuf, errbuf_size - 1, "[TSRemapNewInstance] - Key number (%d) >
MAX_KEY_NUM (%d) or NaN.", keynum,
                    MAX_KEY_NUM);
+          fclose(file);
           return TS_ERROR;
         }
         strcpy(&cfg->keys[keynum][0], value);
@@ -167,6 +168,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int
errbuf_s
     if (cfg->err_url == NULL) {
       snprintf(errbuf, errbuf_size - 1,
                "[TSRemapNewInstance] - Invalid config, err_status == 302, but err_url ==
NULL");
+      fclose(file);
       return TS_ERROR;
     }
     break;
@@ -180,6 +182,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int
errbuf_s
     break;
   default:
     snprintf(errbuf, errbuf_size - 1, "[TSRemapNewInstance] - Return code %d not supported.",
cfg->err_status);
+    fclose(file);
     return TS_ERROR;
 
   }


Mime
View raw message