summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_wireprotocol.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2010-04-01 13:26:41 +0000
committerAndrey Hristov <andrey@php.net>2010-04-01 13:26:41 +0000
commitf534df710efbe6a4450f74930e2666d3baaf57c3 (patch)
treefa065911bba8b37580ebd1363760f5e5d294b2f9 /ext/mysqlnd/mysqlnd_wireprotocol.c
parenta712d9cefb1015803e22d76110edd3290226544d (diff)
downloadphp-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_wireprotocol.c')
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.c2
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;