Re: not checking value returned from palloc? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: not checking value returned from palloc?
Date
Msg-id 200603192238.50603.peter_e@gmx.net
Whole thread Raw
In response to not checking value returned from palloc?  (Mark Dilger <pgsql@markdilger.com>)
Responses Re: not checking value returned from palloc?  (Mark Dilger <pgsql@markdilger.com>)
List pgsql-hackers
Mark Dilger wrote:
> Looking through the postgresql source code, I notice that there are
> many places were palloc is used but the return value is not checked
> to see if it is null.

palloc will throw an exception if it cannot fulfill the request.  Code 
that checks the return value for null is in fact a waste.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: not checking value returned from palloc?
Next
From: Tom Lane
Date:
Subject: Re: not checking value returned from palloc?