Fix memory leak problem caused by commit adcb636.
authorTatsuo Ishii <ishii@postgresql.org>
Thu, 30 Mar 2017 00:20:32 +0000 (09:20 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Thu, 30 Mar 2017 00:26:00 +0000 (09:26 +0900)
commit36a34cfe5bb8ac1a78a86521b1f07977fc334d4a
tree45ed3b7220170d60bb2e93582d61ce703f0236e6
parent39de4a11d48b0ca50a4e8a9538265441994298b8
Fix memory leak problem caused by commit adcb636.

Commit adcb636 introduces "pending message queue". When a message
arrives, the info is added to the queue and a copy of object is
created at the same time, but forgoto free the object. Fix is,
creating a new function pool_pending_message_free_pending_message()
and call it after pool_pending_message_add(),
pool_pending_message_get() and pool_pending_message_pull_out().

Problem reported by Sergey Kim.
src/context/pool_session_context.c
src/include/context/pool_session_context.h
src/protocol/pool_process_query.c
src/protocol/pool_proto_modules.c