Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
Date
Msg-id 4457.1434166911@sss.pgh.pa.us
Whole thread Raw
In response to Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-bugs
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Michael Paquier wrote:
>> By the way, your patch does not compile properly and is not in-line
>> with the project's code format. See the updated patch attached ;)

> ... or the conventions for allocating memory.  Why not just use palloc()?

That's hardly the fault of the proposed patch.  But yeah, it seems like
much the best fix here is to get rid of the malloc (and strdup) calls in
this code in favor of using the palloc infrastructure.  Even the calls
that *do* have manual failure checks are not compliant with our usual
coding standards.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
Next
From: cathi.soule@roberthalf.com
Date:
Subject: BUG #13438: Restore using GUI client - Data Not Loading