Re: PQmakeEmptyPGresult() will return NULL if allocation

From: Neil Conway <neilc(at)samurai(dot)com>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: PQmakeEmptyPGresult() will return NULL if allocation
Date: 2005-06-11 12:36:21
Message-ID: 42AADAC5.8010106@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway wrote:
> Some checking reveals that there are a few other bits of code in libpq
> that don't handle malloc() failures correctly. I'll take a look at
> fixing this today or tomorrow.

Attached is a patch that implements this. This adds checking for most of
the call sites of strdup(), malloc(), PQmakeEmptyPGresult(),
pqResultAlloc(), and pqResultStrdup() in libpq. Barring any objections,
I'll apply this to HEAD tomorrow.

-Neil

Attachment Content-Type Size
libpq_oom_handling-4.patch text/x-patch 29.7 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Guillaume LELARGE 2005-06-11 12:49:42 Updated french .po files
Previous Message Matthias Schmidt 2005-06-11 08:04:32 Re: pg_starttime()