summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_wireprotocol.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_wireprotocol.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_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;