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:39:41 +0000 (13:39 +0900)
src/protocol/pool_proto_modules.c

index 18d2d1089538f5688e6f501e9d72fe4bdd8e8628..deb01f4ee22bc67b12ceb7e2114fbd10c0874e3c 100644 (file)
@@ -1102,7 +1102,7 @@ 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);
 
                /*
                 * Create PostgreSQL version cache.  Since the provided query might