diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 72d5c8cc2c2..56afd44d786 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -828,6 +828,7 @@ runShellCommand(CState *st, char *variable, char **argv, int argc) { if (!timer_exceeded) fprintf(stderr, "%s: cannot read the result\n", argv[0]); + (void) pclose(fp); return false; } if (pclose(fp) < 0)