File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,10 @@ static void _php_ibase_free_query(ibase_query *ib_query) /* {{{ */
187
187
zend_list_delete (ib_query -> stmt_res );
188
188
ib_query -> stmt_res = NULL ;
189
189
}
190
+ if (ib_query -> result_res != NULL ) {
191
+ zend_list_delete (ib_query -> result_res );
192
+ ib_query -> result_res = NULL ;
193
+ }
190
194
if (ib_query -> in_array ) {
191
195
efree (ib_query -> in_array );
192
196
}
@@ -1895,13 +1899,14 @@ PHP_FUNCTION(ibase_execute)
1895
1899
}
1896
1900
1897
1901
/* Have we used this cursor before and it's still open (exec proc has no cursor) ? */
1898
- if (ib_query -> result_res != NULL
1899
- && ib_query -> statement_type != isc_info_sql_stmt_exec_procedure ) {
1900
- IBDEBUG ("Implicitly closing a cursor" );
1902
+ if (ib_query -> result_res != NULL ) {
1903
+ if ( ib_query -> statement_type != isc_info_sql_stmt_exec_procedure ) {
1904
+ IBDEBUG ("Implicitly closing a cursor" );
1901
1905
1902
- if (isc_dsql_free_statement (IB_STATUS , & ib_query -> stmt , DSQL_close )) {
1903
- _php_ibase_error ();
1904
- break ;
1906
+ if (isc_dsql_free_statement (IB_STATUS , & ib_query -> stmt , DSQL_close )) {
1907
+ _php_ibase_error ();
1908
+ break ;
1909
+ }
1905
1910
}
1906
1911
zend_list_delete (ib_query -> result_res );
1907
1912
ib_query -> result_res = NULL ;
You can’t perform that action at this time.
0 commit comments