mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -697,15 +697,18 @@ static int retrans_pkt(void *data)
|
||||
static int mgcp_postrequest(struct mgcp_endpoint *p, struct mgcp_subchannel *sub,
|
||||
char *data, int len, unsigned int seqno)
|
||||
{
|
||||
struct mgcp_message *msg = ast_malloc(sizeof(*msg) + len);
|
||||
struct mgcp_message *msg;
|
||||
struct mgcp_message *cur;
|
||||
struct mgcp_gateway *gw = ((p && p->parent) ? p->parent : NULL);
|
||||
struct mgcp_gateway *gw;
|
||||
struct timeval tv;
|
||||
|
||||
msg = ast_malloc(sizeof(*msg) + len);
|
||||
if (!msg) {
|
||||
return -1;
|
||||
}
|
||||
gw = ((p && p->parent) ? p->parent : NULL);
|
||||
if (!gw) {
|
||||
ast_free(msg);
|
||||
return -1;
|
||||
}
|
||||
/* SC
|
||||
|
Reference in New Issue
Block a user