Wed May 13 12:35:38 CDT 2009 Pekka Pessi <first.last@nokia.com>

* nta_incoming_create_response(): sanitized oom check


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13345 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-05-15 16:12:41 +00:00
parent 469bc4789a
commit be1650e4ea
2 changed files with 7 additions and 5 deletions

View File

@ -1 +1 @@
Fri May 15 11:11:24 CDT 2009
Fri May 15 11:12:29 CDT 2009

View File

@ -6386,11 +6386,13 @@ msg_t *nta_incoming_create_response(nta_incoming_t *irq,
msg = nta_msg_create(irq->irq_agent, 0);
sip = sip_object(msg);
if (sip && status != 0)
sip->sip_status = sip_status_create(msg_home(msg), status, phrase, NULL);
if (sip) {
if (status != 0)
sip->sip_status = sip_status_create(msg_home(msg), status, phrase, NULL);
if (nta_incoming_response_headers(irq, msg, sip) < 0)
msg_destroy(msg), msg = NULL;
if (nta_incoming_response_headers(irq, msg, sip) < 0)
msg_destroy(msg), msg = NULL;
}
}
return msg;