Don't increase the refcount of id, if we already have increased the refcount

of the same id before.

PR: #8225
This commit is contained in:
Sascha Schumann 2000-12-13 12:26:25 +00:00
parent b2a016135e
commit 08d104e040

View File

@ -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);
}
}