Another round of Coverity fixes
authorStephen Frost <sfrost@snowman.net>
Mon, 3 Mar 2014 08:18:51 +0000 (03:18 -0500)
committerStephen Frost <sfrost@snowman.net>
Mon, 3 Mar 2014 08:18:51 +0000 (03:18 -0500)
commit5592ebac55460866da867df5c783c34e3c9a7cae
treea7792bd0189203b5f8acb33d1b312e9baaece5fb
parentb1aebbb6a86e96d7b8f3035ac730dfc24652496c
Another round of Coverity fixes

Additional non-security issues/improvements spotted by Coverity.

In backend/libpq, no sense trying to protect against port->hba being
NULL after we've already dereferenced it in the switch() statement.

Prevent against possible overflow due to 32bit arithmitic in
basebackup throttling (not yet released, so no security concern).

Remove nonsensical check of array pointer against NULL in procarray.c,
looks to be a holdover from 9.1 and earlier when there were pointers
being used but now it's just an array.

Remove pointer check-against-NULL in tsearch/spell.c as we had already
dereferenced it above (in the strcmp()).

Remove dead code from adt/orderedsetaggs.c, isnull is checked
immediately after each tuplesort_getdatum() call and if true we return,
so no point checking it again down at the bottom.

Remove recently added minor error-condition memory leak in pg_regress.
src/backend/libpq/auth.c
src/backend/replication/basebackup.c
src/backend/storage/ipc/procarray.c
src/backend/tsearch/spell.c
src/backend/utils/adt/orderedsetaggs.c
src/test/regress/pg_regress.c