From 08d104e04041685502301b24b80afe82674e8c02 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Wed, 13 Dec 2000 12:26:25 +0000 Subject: [PATCH] Don't increase the refcount of id, if we already have increased the refcount of the same id before. PR: #8225 --- ext/pgsql/pgsql.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 11722eae0a4..76bd96216db 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -117,8 +117,10 @@ static void php_pgsql_set_default_link(int id) if (PGG(default_link)!=-1) { zend_list_delete(PGG(default_link)); } - PGG(default_link) = id; - zend_list_addref(id); + if (PGG(default_link) != id) { + PGG(default_link) = id; + zend_list_addref(id); + } }