summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2001-02-15 02:15:36 +0000
committerZeev Suraski <zeev@php.net>2001-02-15 02:15:36 +0000
commitc239da7e66a06a66c963802e3589889f6c8b4b6b (patch)
tree6eb82fe2c80db62c8ec2ad5e09141c248a0512b0
parent0a446bc2746c8964ad95b19cf09c259310655722 (diff)
downloadphp-git-c239da7e66a06a66c963802e3589889f6c8b4b6b.tar.gz
Fix the PostgreSQL fix...
-rw-r--r--ext/pgsql/pgsql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 1147323a47..67f2fe732a 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -114,7 +114,7 @@ static void php_pgsql_set_default_link(int id)
{
PGLS_FETCH();
- if ((PGG(default_link) != -1) && (PGG(default_link) != id)) {
+ if (PGG(default_link) != -1) {
zend_list_delete(PGG(default_link));
}
@@ -423,9 +423,9 @@ void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
ptr = zend_list_find(link,&type); /* check if the link is still there */
if (ptr && (type==le_link || type==le_plink)) {
return_value->value.lval = link;
+ zend_list_addref(link);
php_pgsql_set_default_link(link);
return_value->type = IS_RESOURCE;
- zend_list_addref(link);
efree(hashed_details);
return;
} else {