Fix memory leak per Coverity.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 12 Sep 2019 04:39:41 +0000 (13:39 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 12 Sep 2019 04:53:37 +0000 (13:53 +0900)
src/protocol/pool_proto_modules.c

index 30a0712cdfb28acb1f9963cc461c806f3ca1daca..d0356593aa4f35a0e9371b9b51e9e43fe7eedd70 100644 (file)
@@ -1057,7 +1057,7 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend,
                /*
                 * Start query context
                 */
-               pool_start_query(query_context, pstrdup(stmt), strlen(stmt) + 1, node);
+               pool_start_query(query_context, stmt, strlen(stmt) + 1, node);
 
                msg = pool_create_sent_message('P', len, contents, 0, name, query_context);