Обсуждение: pgsql: Fix file descriptor leak after failure of a \setshell command in

Поиск
Список
Период
Сортировка

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

От
Tom Lane
Дата:
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_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/926da211a38e40f4aec78ccf8aab734bb9b69ba4

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