pgpool2.git / summary / log / commit / refs
commit dfee4f4b34722e9af136d66b0af38982c8ea324e
Author: Muhammad Usama <m.usama@gmail.com>
Date: Tue Jul 08 11:59:29 2014 +0000
fix coverity issue:1223007 Use after free.
get_insert_command_table_name() function was using the
freed pointer in pool_debug() function call.
src/protocol/pool_process_query.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/protocol/pool_process_query.c b/src/protocol/pool_process_query.c
index 411ffede3..a095d3724 100644
--- a/src/protocol/pool_process_query.c
+++ b/src/protocol/pool_process_query.c
@@ -3327,8 +3327,8 @@ static char *get_insert_command_table_name(InsertStmt *node)
pfree(p);
MemoryContextSwitchTo(old_context);
-
- pool_debug("get_insert_command_table_name: extracted table name: %s", p);
+ ereport(DEBUG2,
+ (errmsg("table name in insert command is \"%s\"", table)));
return table;
}
[parent: 1c60aea228e1]