]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 314549 via svnmerge from
authorTerry Wilson <twilson@digium.com>
Thu, 21 Apr 2011 00:23:04 +0000 (00:23 +0000)
committerTerry Wilson <twilson@digium.com>
Thu, 21 Apr 2011 00:23:04 +0000 (00:23 +0000)
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

channels/chan_sip.c

index f4ece9aa9a07799e052dfffb146b36b980065101..00e2cae7e2cafb81ca27e585dbfeb6bc32a6d5b9 100644 (file)
@@ -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 */