Re: [HACKERS] not checking value returned from palloc?

2006-03-19 Thread Peter Eisentraut
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

Re: [HACKERS] not checking value returned from palloc?

2006-03-19 Thread Tom Lane
Mark Dilger [EMAIL PROTECTED] writes: 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. Any place that *does* check it is incorrect (in the sense of being wasted code space, not

Re: [HACKERS] not checking value returned from palloc?

2006-03-19 Thread Mark Dilger
Peter Eisentraut wrote: 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

Re: [HACKERS] not checking value returned from palloc?

2006-03-19 Thread Alvaro Herrera
Mark Dilger wrote: Peter Eisentraut wrote: 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.

Re: [HACKERS] not checking value returned from palloc?

2006-03-19 Thread Bruce Momjian
Alvaro Herrera wrote: Mark Dilger wrote: Peter Eisentraut wrote: 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

Re: [HACKERS] not checking value returned from palloc?

2006-03-19 Thread Neil Conway
On Sun, 2006-03-19 at 17:14 -0500, Bruce Momjian wrote: I see one in cash.c that I will remove. I've already checked in a fix for that, as well as a few other places that made similar mistakes -- sorry for stepping on your toes. -Neil ---(end of