summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_priv.h
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_priv.h
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_priv.h')
-rw-r--r--ext/mysqlnd/mysqlnd_priv.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h
index 7eb38b68dd..3ca37eaddb 100644
--- a/ext/mysqlnd/mysqlnd_priv.h
+++ b/ext/mysqlnd/mysqlnd_priv.h
@@ -93,10 +93,10 @@
#define SET_NEW_MESSAGE(buf, buf_len, message, len, persistent) \
{\
if ((buf)) { \
- pefree((buf), (persistent)); \
+ mnd_pefree((buf), (persistent)); \
} \
if ((message)) { \
- (buf) = pestrndup((message), (len), (persistent)); \
+ (buf) = mnd_pestrndup((message), (len), (persistent)); \
} else { \
buf = NULL; \
} \
@@ -106,7 +106,7 @@
#define SET_EMPTY_MESSAGE(buf, buf_len, persistent) \
{\
if ((buf)) { \
- pefree((buf), (persistent)); \
+ mnd_pefree((buf), (persistent)); \
(buf) = NULL; \
} \
(buf_len) = 0; \