Fix double pfree in 1b63aeb31.
authorTatsuo Ishii <ishii@postgresql.org>
Sat, 19 Jul 2025 06:26:30 +0000 (15:26 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Sat, 19 Jul 2025 06:26:30 +0000 (15:26 +0900)
By an oversight, the commit could bring a double pfree situation.

src/protocol/pool_process_query.c

index 467e50baa59a93cd54a433820ced93b041f4a231..9a23f86f06ec7bbfe1c8a15b286bcbbe44219125 100644 (file)
@@ -5296,6 +5296,7 @@ pool_push_pending_data(POOL_CONNECTION *backend)
                {
                        pool_push(backend, buf, len);
                        pfree(buf);
+                       buf = NULL;
                }
                data_pushed = true;
                if (kind == 'E')