diff options
author | Paul Moosman <pwmoosman@php.net> | 2001-07-23 16:10:10 +0000 |
---|---|---|
committer | Paul Moosman <pwmoosman@php.net> | 2001-07-23 16:10:10 +0000 |
commit | 22a8e9536ad16b4978586efb36b811dcfc855e26 (patch) | |
tree | 5023f3cc7e4500b3177ebfd1436f46640afa7aeb /ext/sybase_ct/php_sybase_ct.c | |
parent | 076f4f5136b8f01bab9e2b3c91acbd0d408ed49d (diff) | |
download | php-git-22a8e9536ad16b4978586efb36b811dcfc855e26.tar.gz |
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.
Diffstat (limited to 'ext/sybase_ct/php_sybase_ct.c')
-rw-r--r-- | ext/sybase_ct/php_sybase_ct.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index bd7090cf4d..c09720a900 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -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)); } |