You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by su...@apache.org on 2015/01/15 01:40:14 UTC
trafficserver git commit: [TS-3294]: Add null pointer check
Repository: trafficserver
Updated Branches:
refs/heads/master c22266848 -> 2b021b080
[TS-3294]: Add null pointer check
Coverity CID#1226153
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2b021b08
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2b021b08
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2b021b08
Branch: refs/heads/master
Commit: 2b021b0807cae5ee1dea820a27b1cf6cba4ed43d
Parents: c222668
Author: Sudheer Vinukonda <su...@yahoo-inc.com>
Authored: Thu Jan 15 00:39:29 2015 +0000
Committer: Sudheer Vinukonda <su...@yahoo-inc.com>
Committed: Thu Jan 15 00:39:29 2015 +0000
----------------------------------------------------------------------
example/blacklist-1/blacklist-1.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2b021b08/example/blacklist-1/blacklist-1.c
----------------------------------------------------------------------
diff --git a/example/blacklist-1/blacklist-1.c b/example/blacklist-1/blacklist-1.c
index 6c96965..c7b0797 100644
--- a/example/blacklist-1/blacklist-1.c
+++ b/example/blacklist-1/blacklist-1.c
@@ -188,7 +188,9 @@ read_blacklist(TSCont contp)
/* If the Mutext lock is not successful try again in RETRY_TIME */
if (TSMutexLockTry(sites_mutex) != TS_SUCCESS) {
- TSfclose(file);
+ if (file != NULL) {
+ TSfclose(file);
+ }
TSContSchedule(contp, RETRY_TIME, TS_THREAD_POOL_DEFAULT);
return;
}