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

2013-01-21 Thread Xi Wang
On 1/20/13 10:35 PM, Tom Lane wrote: Great catch, will commit. (But first I'm looking through commit 2594cf0e to see if I made the same mistake anywhere else :-(.) How did you find that, coverity or some such tool? Thanks for reviewing the patch. It was found using a homemade static undefine

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

2013-01-20 Thread Tom Lane
Xi Wang writes: > The correct NULL check should use `*newval'; `newval' must be non-null. Great catch, will commit. (But first I'm looking through commit 2594cf0e to see if I made the same mistake anywhere else :-(.) How did you find that, coverity or some such tool? re

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

2013-01-20 Thread Tom Lane
Stephen Frost writes: > * Xi Wang (xi.w...@gmail.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.

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

2013-01-20 Thread Stephen Frost
* Xi Wang (xi.w...@gmail.com) wrote: > The correct NULL check should use `*newval'; `newval' must be non-null. Why isn't this using pstrdup()..? Thanks, Stephen signature.asc Description: Digital signature

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

2013-01-20 Thread Dickson S. Guedes
2013/1/20 Xi Wang : > The correct NULL check should use `*newval'; `newval' must be non-null. [... cutting code ...] Please see [1] to know how is our submit patch process. [1] http://wiki.postgresql.org/wiki/Submitting_a_Patch regards, -- Dickson S. Guedes mail/xmpp: gue...@guedesoft.net - sk

[HACKERS] [PATCH] Fix NULL checking in check_TSCurrentConfig()

2013-01-19 Thread Xi Wang
The correct NULL check should use `*newval'; `newval' must be non-null. --- src/backend/utils/cache/ts_cache.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/cache/ts_cache.c b/src/backend/utils/cache/ts_cache.c index e688b1a..65a8ad7 100644 --- a/src/bac