Re: pgsql: Various Coverity-spotted fixes - Mailing list pgsql-committers

From Bruce Momjian
Subject Re: pgsql: Various Coverity-spotted fixes
Date
Msg-id 20140305020657.GA20985@momjian.us
Whole thread Raw
In response to pgsql: Various Coverity-spotted fixes  (Stephen Frost <sfrost@snowman.net>)
Responses Re: pgsql: Various Coverity-spotted fixes  (Stephen Frost <sfrost@snowman.net>)
List 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@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Provide a FORCE NULL option to COPY in CSV mode.
Next
From: Stephen Frost
Date:
Subject: Re: pgsql: Various Coverity-spotted fixes