On Wed, Apr 19, 2006 at 10:32:21AM -0400, Tom Lane wrote:
> The first patch looks reasonable but I object to the second. Coverity
> is not going to dictate coding conventions to us --- it is not *nearly*
> bright enough for that. In this case, the code is locally allowing for
> the possibility that AH->currSchema was NULL, and I don't consider it
> good style to remove that allowance. (I take it BTW that this allegedly
> bulletproof tool fails to consider the possibility that strdup fails
> and returns NULL ...)
Sure. These are just high on the scale of silliness. There are many
more that are less silly which I'm just ignoring.
Note, what coverity actually picked up was that in the latter case in
_selectOutputSchema that the free will always execute because if
AH->currSchema was NULL it would have died at the beginning of the
function (line 2205). It's me who misinterpreted the fix. We should
probably be adding checks to all the strdups and to line 2205 instead.
It doesn't directly complain about strdup itself because nowhere does
any code do a strdup and dereference it in the same function.
Have a nice day,
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
In response to
pgsql-patches by date
|Next:||From: Tom Lane||Date: 2006-04-19 14:55:25|
|Subject: Re: Patch for #2391: "Similar to" pattern matching does not operate as documented |
|Previous:||From: Tom Lane||Date: 2006-04-19 14:45:48|
|Subject: Re: bug in windows xp |