Skip to content

Commit a715a08

Browse files
author
Dan Kalowsky
committed
Ends memory leak in PHP when using Solid DB systems. Thanks to Eric Veldhuyzen.
1 parent 9c9a313 commit a715a08

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ext/odbc/php_odbc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ function_entry odbc_functions[] = {
9797
PHP_FE(odbc_field_type, NULL)
9898
PHP_FE(odbc_field_num, NULL)
9999
PHP_FE(odbc_free_result, NULL)
100+
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
100101
PHP_FE(odbc_next_result, NULL)
102+
#endif
101103
PHP_FE(odbc_num_fields, NULL)
102104
PHP_FE(odbc_num_rows, NULL)
103105
PHP_FE(odbc_result, NULL)
@@ -2231,6 +2233,7 @@ PHP_FUNCTION(odbc_num_rows)
22312233
}
22322234
/* }}} */
22332235

2236+
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
22342237
/* {{{ proto bool next_result(int result_id)
22352238
Checks if multiple results are avaiable */
22362239
PHP_FUNCTION(odbc_next_result)
@@ -2278,6 +2281,7 @@ PHP_FUNCTION(odbc_next_result)
22782281
}
22792282
}
22802283
/* }}} */
2284+
#endif
22812285

22822286
/* {{{ proto int odbc_num_fields(int result_id)
22832287
Get number of columns in a result */

ext/odbc/php_odbc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ PHP_FUNCTION(odbc_field_name);
217217
PHP_FUNCTION(odbc_field_type);
218218
PHP_FUNCTION(odbc_field_num);
219219
PHP_FUNCTION(odbc_free_result);
220+
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
220221
PHP_FUNCTION(odbc_next_result);
222+
#endif
221223
PHP_FUNCTION(odbc_num_fields);
222224
PHP_FUNCTION(odbc_num_rows);
223225
PHP_FUNCTION(odbc_prepare);

0 commit comments

Comments
 (0)