diff options
| author | Andrey Hristov <andrey@php.net> | 2010-04-01 13:26:41 +0000 |
|---|---|---|
| committer | Andrey Hristov <andrey@php.net> | 2010-04-01 13:26:41 +0000 |
| commit | f534df710efbe6a4450f74930e2666d3baaf57c3 (patch) | |
| tree | fa065911bba8b37580ebd1363760f5e5d294b2f9 /ext/mysqlnd/mysqlnd_ps_codec.c | |
| parent | a712d9cefb1015803e22d76110edd3290226544d (diff) | |
| download | php-git-f534df710efbe6a4450f74930e2666d3baaf57c3.tar.gz | |
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.c | 6 |
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); |
