| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Fix file descriptor leak after failure of a \setshell command in |
| Date: | 2014-12-16 18:32:57 |
| Message-ID: | E1Y0wvZ-0006cF-PI@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/3b750ec155be3b8d658eadd8effe4d3c31955852
Modified Files
--------------
contrib/pgbench/pgbench.c | 1 +
1 file changed, 1 insertion(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2014-12-16 19:54:05 | pgsql: Suppress bogus statistics when pgbench failed to complete any tr |
| Previous Message | Andrew Dunstan | 2014-12-16 15:41:47 | pgsql: Fix some jsonb issues found by Coverity in recent commits. |