summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_ps_codec.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2010-04-06 13:28:23 +0000
committerAndrey Hristov <andrey@php.net>2010-04-06 13:28:23 +0000
commitaa8f43fad9677cc73663bd1a675107d8a8f6af27 (patch)
tree2dd5e41395ca974dd6bcae3091efc816de22cd8b /ext/mysqlnd/mysqlnd_ps_codec.c
parent5f11cd5693eeb658d3cbafd3fed7d51df296dafe (diff)
downloadphp-git-aa8f43fad9677cc73663bd1a675107d8a8f6af27.tar.gz
Recommit with an Windows build fix:
Fix inconsistencies - memory allocated with spprintf, or likes, outside of mysqlnd's allocator functions should not be freed by the mysqlnd's allocator (a wrapper around emalloc/malloc). - memory allocated by the mysqlnd's allocator should only be freed by it. - add a mode to track memory usage (malloc/free)
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ps_codec.c')
-rw-r--r--ext/mysqlnd/mysqlnd_ps_codec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c
index dba749211c..5cc2f8bbdd 100644
--- a/ext/mysqlnd/mysqlnd_ps_codec.c
+++ b/ext/mysqlnd/mysqlnd_ps_codec.c
@@ -270,7 +270,7 @@ void ps_fetch_time(zval *zv, const MYSQLND_FIELD * const field,
if (!as_unicode) {
#endif
ZVAL_STRINGL(zv, to, length, 1);
- mnd_efree(to);
+ efree(to); /* allocated by spprintf */
#if PHP_MAJOR_VERSION >= 6
} else {
ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE);
@@ -321,7 +321,7 @@ void ps_fetch_date(zval *zv, const MYSQLND_FIELD * const field,
if (!as_unicode) {
#endif
ZVAL_STRINGL(zv, to, length, 1);
- mnd_efree(to);
+ efree(to); /* allocated by spprintf */
#if PHP_MAJOR_VERSION >= 6
} else {
ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE);
@@ -380,7 +380,7 @@ void ps_fetch_datetime(zval *zv, const MYSQLND_FIELD * const field,
if (!as_unicode) {
#endif
ZVAL_STRINGL(zv, to, length, 1);
- mnd_efree(to);
+ efree(to); /* allocated by spprintf */
#if PHP_MAJOR_VERSION >= 6
} else {
ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE);