From: Terry Wilson Date: Thu, 21 Apr 2011 00:23:04 +0000 (+0000) Subject: Merged revisions 314549 via svnmerge from X-Git-Tag: 1.8.5-rc1~11^2~210 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=459ab135c26f4f99325ac9604f9d3832a204a2b2;p=thirdparty%2Fasterisk.git Merged revisions 314549 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r314549 | twilson | 2011-04-20 17:17:34 -0700 (Wed, 20 Apr 2011) | 6 lines 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. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@314550 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f4ece9aa9a..00e2cae7e2 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3523,7 +3523,7 @@ static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, int seqno, int res } } - 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 */