Thread: trivial one-off memory leak in guc-file.l ParseConfigFile

trivial one-off memory leak in guc-file.l ParseConfigFile

From
didier
Date:
Hi

fix a small memory leak in guc-file.l ParseConfigFile

AbsoluteConfigLocation() return a strdup string but it's never free or referenced outside ParseConfigFile

Courtesy Valgrind and Noah Misch MEMPOOL work.

Regards
Didier
Attachment

Re: trivial one-off memory leak in guc-file.l ParseConfigFile

From
Robert Haas
Date:
On Sun, Sep 22, 2013 at 3:40 PM, didier <did447@gmail.com> wrote:
> fix a small memory leak in guc-file.l ParseConfigFile
>
> AbsoluteConfigLocation() return a strdup string but it's never free or
> referenced outside ParseConfigFile
>
> Courtesy Valgrind and Noah Misch MEMPOOL work.

I'd like to look at this, but I haven't got time right now.  Could you
add it to the next CommitFest so it doesn't get forgotten about?

https://commitfest.postgresql.org/action/commitfest_view/open

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



Re: trivial one-off memory leak in guc-file.l ParseConfigFile

From
Heikki Linnakangas
Date:
On 22.09.2013 22:40, didier wrote:
> Hi
>
> fix a small memory leak in guc-file.l ParseConfigFile
>
> AbsoluteConfigLocation() return a strdup string but it's never free or
> referenced outside ParseConfigFile
>
> Courtesy Valgrind and Noah Misch MEMPOOL work.

I spotted and fixed this some time ago while fixing another leak, see 
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=138184adc5f7c60c184972e4d23f8cdb32aed77d. 
I didn't realize you had already reported it back then.

So, I've marked this as committed in the commitfest app. But thanks for 
the report anyway.

- Heikki