diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-11 03:25:04 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-11 03:25:04 +0000 |
commit | d16c3fd4ca7637d33efa163106630a4110f7a448 (patch) | |
tree | 0cd32982e8825620c5d5bf61f85e3830118f357f /channels/h323 | |
parent | 8e1667bc2d6b310744333ee2e30fd331fd66c70d (diff) |
Fix malloc debug macros to work properly with h323.
The main problem here was that cstdlib was undefining free thereby causing the
proper debug macros to not be used. ast_h323.cxx has been changed to call
ast_free instead to avoid the issue. Because using the ast prefix calls are
a better choice, ast_free_ptr is the new wrapper for free to pass to functions.
Also, a little bit of clean up was done to avoid the debug macros intentionally
being redefined.
(closes issue #13593)
Reported by: pj
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@181133 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323')
-rw-r--r-- | channels/h323/ast_h323.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/channels/h323/ast_h323.cxx b/channels/h323/ast_h323.cxx index ee1fda448..1547bedcd 100644 --- a/channels/h323/ast_h323.cxx +++ b/channels/h323/ast_h323.cxx @@ -28,6 +28,8 @@ * * Version Info: $Id$ */ +#include "asterisk.h" + #include <arpa/inet.h> #include <list> @@ -152,7 +154,7 @@ int PAsteriskLog::Buffer::sync() ast_verbose("%s", s); *s1 = c; } - free(str); + ast_free(str); string = PString(); char *base = string.GetPointer(2000); @@ -2015,7 +2017,7 @@ MyH323_ExternalRTPChannel::MyH323_ExternalRTPChannel(MyH323Connection & connecti /* tell the H.323 stack */ SetExternalAddress(H323TransportAddress(localIpAddr, localPort), H323TransportAddress(localIpAddr, localPort + 1)); /* clean up allocated memory */ - free(info); + ast_free(info); } /* Get the payload code */ @@ -2234,7 +2236,7 @@ int h323_set_alias(struct oh323_alias *alias) endPoint->SetGateway(); } if (prefix) - free(prefix); + ast_free(prefix); } return 0; } |