diff options
author | Dan Kalowsky <kalowsky@php.net> | 2002-09-04 04:24:54 +0000 |
---|---|---|
committer | Dan Kalowsky <kalowsky@php.net> | 2002-09-04 04:24:54 +0000 |
commit | 610b2b76d74ae760d19580695464581c49e5fe19 (patch) | |
tree | 6a848ed53e9b36584f77bb32b93cf7da876407b9 /ext/fbsql/php_fbsql.c | |
parent | 21e5f8ed77b8fd819727f38f8539002124660987 (diff) | |
download | php-git-610b2b76d74ae760d19580695464581c49e5fe19.tar.gz |
Fix for bug #19155 UNTESTED. Unfortunately I don't have a way to test it
hopefully the user will.
Diffstat (limited to 'ext/fbsql/php_fbsql.c')
-rw-r--r-- | ext/fbsql/php_fbsql.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index 251365738d..5467ace8e1 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -673,7 +673,8 @@ PHP_FUNCTION(fbsql_close) { PHPFBLink* phpLink = NULL; zval **fbsql_link_index = NULL; - int id; + int id, i, nument, type; + void *ptr; switch (ZEND_NUM_ARGS()) { case 0: @@ -692,6 +693,19 @@ PHP_FUNCTION(fbsql_close) } ZEND_FETCH_RESOURCE2(phpLink, PHPFBLink *, fbsql_link_index, id, "FrontBase-Link", le_link, le_plink); + nument = zend_hash_next_free_element(&EG(regular_list)); + for (i = 1; i < nument; i++) { + ptr = zend_list_find(i, &type); + if (ptr && (type == le_result)) { + PHPFBResult *result; + + result = (PHPFBResult *)ptr; + if (result->link == phpLink) { + zend_list_delete(i); + } + } + } + if (id==-1) { /* explicit resource number */ zend_list_delete(Z_RESVAL_PP(fbsql_link_index)); } |