Fix for segmentation fault in PCP processor: Bug 598
authorMuhammad Usama <m.usama@gmail.com>
Thu, 16 Apr 2020 10:09:14 +0000 (15:09 +0500)
committerMuhammad Usama <m.usama@gmail.com>
Thu, 16 Apr 2020 10:09:14 +0000 (15:09 +0500)
commitd57000fd205aaa922193d7addfa1b3c4c5188548
treebcc5a7f05119033d525d3402f065d144798e0ab9
parent7cb8574e709bc06f759da09a4f598a88f1c1c70c
Fix for segmentation fault in PCP processor: Bug 598

The crash was caused by an unconditionally pfree on buf without verifyingif it
was actually allocated or not. And freeing the but was not actually required at
the first places since the associated MemoryContext always gets resets anyway
after each loop iteration.

reference: https://www.pgpool.net/mantisbt/view.php?id=598
src/pcp_con/pcp_worker.c