From 17afe87bd58bc3faf1c2a7af6d195283e2156cda Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Wed, 25 Sep 2019 14:22:21 +0900 Subject: [PATCH] Fix memory leak in replication mode. Per coverity. --- 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 a36a97244..6bbb8671a 100644 --- a/src/protocol/pool_process_query.c +++ b/src/protocol/pool_process_query.c @@ -2763,10 +2763,10 @@ insert_lock(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backend, char *qu } else if (lock_kind == 2) { - POOL_SELECT_RESULT *result; - per_node_statement_log(backend, i, qbuf); do_query(CONNECTION(backend, i), qbuf, &result, MAJOR(backend)); + if (result) + free_select_result(result); } } -- 2.39.5