Re: pgsql: Various Coverity-spotted fixes

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Various Coverity-spotted fixes
Date: 2014-03-05 02:06:57
Message-ID: 20140305020657.GA20985@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Sun, Mar 2, 2014 at 03:14:35AM +0000, Stephen Frost wrote:
> Various Coverity-spotted fixes
>
> A number of issues were identified by the Coverity scanner and are
> addressed in this patch. None of these appear to be security issues
> and many are mostly cosmetic changes.
>
> Short comments for each of the changes follows.
>
> Correct the semi-colon placement in be-secure.c regarding SSL retries.
> Remove a useless comparison-to-NULL in proc.c (value is dereferenced
> prior to this check and therefore can't be NULL).
> Add checking of chmod() return values to initdb.
> Fix a couple minor memory leaks in initdb.
> Fix memory leak in pg_ctl- involves free'ing the config file contents.
----------------------------------------------------------------------

I am seeing a pg_ctl crash if you run 'pg_ctl status' when the server is
running:

*** glibc detected *** pg_ctl: free(): invalid pointer:
0x00000000011c42c8 ***

The error is coming from the new free_readfile() function. I believe
the error was introduced in this commit.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2014-03-05 02:07:53 Re: pgsql: Various Coverity-spotted fixes
Previous Message Andrew Dunstan 2014-03-04 22:40:38 pgsql: Provide a FORCE NULL option to COPY in CSV mode.