[asterisk-commits] twilson: branch 1.6.2 r314549 - /branches/1.6.2/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Apr 20 19:17:37 CDT 2011
Author: twilson
Date: Wed Apr 20 19:17:34 2011
New Revision: 314549
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=314549
Log:
Don't allocate more space than necessary for a sip_pkt
This extra allocation is a hold-over from when pkt->data was a
character array. Now that it is an allocated string, just allocate
enough for the sip_pkt.
Modified:
branches/1.6.2/channels/chan_sip.c
Modified: branches/1.6.2/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/channels/chan_sip.c?view=diff&rev=314549&r1=314548&r2=314549
==============================================================================
--- branches/1.6.2/channels/chan_sip.c (original)
+++ branches/1.6.2/channels/chan_sip.c Wed Apr 20 19:17:34 2011
@@ -3938,7 +3938,7 @@
}
}
- if (!(pkt = ast_calloc(1, sizeof(*pkt) + len + 1)))
+ if (!(pkt = ast_calloc(1, sizeof(*pkt))))
return AST_FAILURE;
/* copy data, add a terminator and save length */
if (!(pkt->data = ast_str_create(len))) {
More information about the asterisk-commits
mailing list