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 | d339672e45bf18b0d17e78d4e2bf9026557682fe (patch) | |
| tree | db0e753949d96e9dec3a9269beffe61711ed9605 /ext/mysqlnd/mysqlnd_wireprotocol.c | |
| parent | ffb8df30abfaca1f47355bd452db2de4035543aa (diff) | |
| download | php-git-d339672e45bf18b0d17e78d4e2bf9026557682fe.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_wireprotocol.c')
| -rw-r--r-- | ext/mysqlnd/mysqlnd_wireprotocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 03f8550b28..dabd1b889e 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -542,7 +542,7 @@ php_mysqlnd_ok_read(void *_packet, MYSQLND *conn TSRMLS_DC) /* There is a message */ if (packet->header.size > p - buf && (i = php_mysqlnd_net_field_length(&p))) { - packet->message = estrndup((char *)p, MIN(i, buf_len - (p - begin))); + packet->message = mnd_pestrndup((char *)p, MIN(i, buf_len - (p - begin)), FALSE); packet->message_len = i; } else { packet->message = NULL; |
