git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: c831593) | patch
Fix file descriptor leak after failure of a \setshell command in pgbench.
2014年12月16日 18:31:42 +0000 (13:31 -0500)
2014年12月16日 18:31:42 +0000 (13:31 -0500)
commit d38e8d30cecea96a088330133e232c465a222d0a
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.
contrib/pgbench/pgbench.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /