Patch odbc_result_long_memory_leak_fix for ODBC related Bug #51606
Patch version 2010-04-19 19:57 UTC
Return to Bug #51606 |
Download this patch
Patch Revisions:
Developer: arobins@csg.uwaterloo.ca
Index: ext/odbc/php_odbc.c
===================================================================
--- ext/odbc/php_odbc.c (revision 298185)
+++ ext/odbc/php_odbc.c (working copy)
@@ -1880,6 +1880,8 @@
} else if (rc == SQL_NO_DATA_FOUND) {
efree(field);
RETURN_FALSE;
+ } else if (rc == SQL_SUCCESS) {
+ field = erealloc(field, result->values[field_ind].vallen);
}
/* Reduce fieldlen by 1 if we have char data. One day we might
have binary strings... */
|