Re: pgsql: Plug more memory leaks when reloading config file.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Plug more memory leaks when reloading config file.
Date: 2014-01-21 16:38:04
Message-ID: CA+TgmoY40A9s7Bn3Qr9Hn33r1=erX-x6rV-EwrQLypuL5_AkRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Tue, Jan 21, 2014 at 11:30 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <rhaas(at)postgresql(dot)org> writes:
>> Plug more memory leaks when reloading config file.
>
> Hm, not too sure about this hunk:
>
> ereport(LOG,
> (errmsg("skipping missing configuration file \"%s\"",
> abs_path)));
> - return OK;
> + OK = true;
> + goto cleanup;
> }
>
> That's changing the semantics, no? That is, what if OK was previously
> false? Seems like this coding might be masking an intended failure
> report. I'd have expected just "goto cleanup" without changing OK.

Good catch, sorry about that.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2014-01-21 16:57:03 pgsql: Fix inadvertent semantics change in last patch to plug memory le
Previous Message Tom Lane 2014-01-21 16:30:09 Re: pgsql: Plug more memory leaks when reloading config file.