From: Sascha Schumann Date: Wed, 13 Dec 2000 12:26:25 +0000 (+0000) Subject: Don't increase the refcount of id, if we already have increased the refcount X-Git-Tag: php-4.0.5RC1~914 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08d104e04041685502301b24b80afe82674e8c02;p=php Don't increase the refcount of id, if we already have increased the refcount of the same id before. PR: #8225 --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 11722eae0a..76bd96216d 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); + } }