pgpool2.git / summary / log / commit / refs

commit    3ad7aaa2bc4546bb1bbf4097c2b24a9e104654bf
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Thu Nov 15 00:21:30 2018 +0000

    Fix memory leak found by Coverity,
    
    This is actually harmless since in the situation pgpool child process
    exits and the leaked memory is gone anyway.  I just want to shut off
    Coverity's complain.


src/protocol/child.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/protocol/child.c b/src/protocol/child.c index fbfb44969..1835afc60 100644 --- a/src/protocol/child.c +++ b/src/protocol/child.c @@ -2034,7 +2034,7 @@ validate_backend_connectivity(int front_end_fd) if (front_end_fd > 0) { POOL_CONNECTION *cp; - StartupPacket *sp; + volatile StartupPacket *sp; /* * we do not want to report socket error, as above errors will be @@ -2064,6 +2064,7 @@ validate_backend_connectivity(int front_end_fd) FlushErrorState(); ereport(FATAL, (errmsg("%s", error_msg), errdetail("%s", error_detail), errhint("%s", error_hint))); + pfree(sp); } PG_END_TRY(); } [parent: bc9119f61b18]