mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
I added code to up the reference count of the database connection
reference. This change fixes bug #11489 in php version 4.0.6. I derived this fix from the my_sql module.
This commit is contained in:
parent
076f4f5136
commit
22a8e9536a
@ -640,6 +640,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
link = (int) index_ptr->ptr;
|
||||
ptr = zend_list_find(link, &type); /* check if the link is still there */
|
||||
if (ptr && (type==le_link || type==le_plink)) {
|
||||
zend_list_addref(link);
|
||||
return_value->value.lval = SybCtG(default_link) = link;
|
||||
return_value->type = IS_RESOURCE;
|
||||
efree(hashed_details);
|
||||
@ -678,6 +679,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
}
|
||||
efree(hashed_details);
|
||||
SybCtG(default_link)=return_value->value.lval;
|
||||
zend_list_addref(SybCtG(default_link));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user