since pgpool-II 2.3 was born in December 2009.
Actually this bug only appears when operated in replication mode
(triggered by timestamp rewriting process by coincidence).
Per bug track:
http://www.pgpool.net/mantisbt/view.php?id=24
*/
void free_select_result(POOL_SELECT_RESULT *result)
{
- int i;
+ int i, j;
+ int index;
if (result->nullflags)
free(result->nullflags);
if (result->data)
{
+ index = 0;
for(i=0;i<result->numrows;i++)
{
- if (result->data[i])
- free(result->data[i]);
+ for (j=0;j<result->rowdesc->num_attrs;j++)
+ {
+ if (result->data[index])
+ free(result->data[index]);
+ index++;
+ }
}
free(result->data);
}