diff options
author | Andrey Hristov <andrey@php.net> | 2010-03-29 17:04:16 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-03-29 17:04:16 +0000 |
commit | 94cd357f5b4a2533510e382e08861269f57602e0 (patch) | |
tree | 65d0d2b969cd8f31eb6af1fbe908c9db965224f1 /ext/mysqlnd/mysqlnd_wireprotocol.h | |
parent | e99039d69269445ea7a786cff6086a314d301da0 (diff) | |
download | php-git-94cd357f5b4a2533510e382e08861269f57602e0.tar.gz |
Make it coupled - what is allocated with mnd_ should be freed
with mnd_ and vice versa.
Added mnd_pestrndup and mnd_pestrdup, which wrap the normal
calls to be able to track this calls.
Fixed some failing tests.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h')
-rw-r--r-- | ext/mysqlnd/mysqlnd_wireprotocol.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 8e36b1fac9..82f0465df3 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -41,7 +41,9 @@ PHPAPI extern const char mysqlnd_read_body_name[]; #define PACKET_FREE(packet) \ do { \ DBG_INF_FMT("PACKET_FREE(%p)", packet); \ - ((packet)->header.m->free_mem((packet), FALSE TSRMLS_CC)); \ + if ((packet)) { \ + ((packet)->header.m->free_mem((packet), FALSE TSRMLS_CC)); \ + } \ } while (0); PHPAPI extern const char * const mysqlnd_command_to_text[COM_END]; |