pgpool2.git / summary / log / commit / refs
commit 3aa4efcdee3cea98e988903f60f11b66e787b9d6
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Mon Apr 03 05:57:25 2017 +0000
Fix coverity warnings.
src/context/pool_query_context.c | 2 +-
src/protocol/CommandComplete.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/context/pool_query_context.c b/src/context/pool_query_context.c
index 7b6d7da74..88464d0b3 100644
--- a/src/context/pool_query_context.c
+++ b/src/context/pool_query_context.c
@@ -88,7 +88,7 @@ void pool_query_context_destroy(POOL_QUERY_CONTEXT *query_context)
MemoryContext memory_context = query_context->memory_context;
ereport(DEBUG1,
- (errmsg("pool_query_context_destroy: query context:%x", query_context)));
+ (errmsg("pool_query_context_destroy: query context:%p", query_context)));
session_context = pool_get_session_context(false);
pool_unset_query_in_progress();
diff --git a/src/protocol/CommandComplete.c b/src/protocol/CommandComplete.c
index ac80ce199..2becf8fc4 100644
--- a/src/protocol/CommandComplete.c
+++ b/src/protocol/CommandComplete.c
@@ -91,7 +91,8 @@ POOL_STATUS CommandComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac
p1 = palloc(len);
memcpy(p1, p, len);
- if (session_context->query_context->parse_tree &&
+ if (session_context->query_context &&
+ session_context->query_context->parse_tree &&
is_start_transaction_query(session_context->query_context->parse_tree))
TSTATE(backend, i) ='T'; /* we are inside a transaction */
[parent: 3fa4d7eba7f0]