Re: not checking value returned from palloc?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Mark Dilger <pgsql(at)markdilger(dot)com>
Subject: Re: not checking value returned from palloc?
Date: 2006-03-19 21:38:49
Message-ID: 200603192238.50603.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-03-19 21:40:20 Re: not checking value returned from palloc?
Previous Message Mark Dilger 2006-03-19 21:20:40 not checking value returned from palloc?