diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2004-01-29 02:54:30 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2004-01-29 02:54:30 +0000 |
| commit | 194509f0932b5776632f310dabd6215fd084e1eb (patch) | |
| tree | 2fb74fc9ad36ac9cbd66d61b9a9d9be7533ea6e0 /ext/pgsql | |
| parent | 7d31f3772cf91ba3d0e138998bd21c22c83fe48d (diff) | |
| download | php-git-194509f0932b5776632f310dabd6215fd084e1eb.tar.gz | |
Fixed bug #27007 (missing connection closure when connect fails in pgsql).
Diffstat (limited to 'ext/pgsql')
| -rw-r--r-- | ext/pgsql/pgsql.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 42e3cb79bf..c2e3f09cc0 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -694,6 +694,9 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) { PHP_PQ_ERROR("Unable to connect to PostgreSQL server: %s", pgsql); + if (pgsql) { + PQfinish(pgsql); + } goto err; } |
