pgsql: Fix file descriptor leak after failure of a \setshell command in

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix file descriptor leak after failure of a \setshell command in
Дата
Msg-id E1Y0wvZ-0006cI-PU@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix file descriptor leak after failure of a \setshell command in pgbench.

If the called command fails to return data, runShellCommand forgot to
pclose() the pipe before returning.  This is fairly harmless in the current
code, because pgbench would then abandon further processing of that client
thread; so no more than nclients descriptors could be leaked this way.  But
it's not hard to imagine future improvements whereby that wouldn't be true.
In any case, it's sloppy coding, so patch all branches.  Found by Coverity.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/5b2c8f04a7cdf161f09ed45c235f0eebf3d88f0d

Modified Files
--------------
contrib/pgbench/pgbench.c |    1 +
1 file changed, 1 insertion(+)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix file descriptor leak after failure of a \setshell command in
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix file descriptor leak after failure of a \setshell command in