Re: [PATCH] Fix NULL checking in check_TSCurrentConfig()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Xi Wang <xi(dot)wang(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Fix NULL checking in check_TSCurrentConfig()
Date: 2013-01-21 03:34:21
Message-ID: 6073.1358739261@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Xi Wang (xi(dot)wang(at)gmail(dot)com) wrote:
>> The correct NULL check should use `*newval'; `newval' must be non-null.

> Why isn't this using pstrdup()..?

The GUC API uses malloc, mainly because guc.c can't afford to lose
control on out-of-memory situations.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-01-21 03:35:45 Re: [PATCH] Fix NULL checking in check_TSCurrentConfig()
Previous Message Craig Ringer 2013-01-21 03:30:08 Re: dividing privileges for replication role.