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.6.2@314549
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
}
}
- 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))) {