On Mon, Jan 6, 2014 at 9:48 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> Couldn't we also handle this by postponing FreeConfigVariables until
>> after the if (error) block?
>
> Wouldn't doing that way can lead to bigger memory leak, if error level
> is ERROR. Though in current fix also it can leak memory but it will be
> just for ErrorConfFile_save. I think some similar case can happen for
> 'pre_value' in code currently as well, that's why I have fixed it in a
> similar way in patch.
I was assuming that error-recovery would reset the containing memory
context, but I'm not sure what memory context we're executing in at
this point.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company