From be1650e4ea0f5157739cdd106f156dc4d473011f Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 15 May 2009 16:12:41 +0000 Subject: [PATCH] Wed May 13 12:35:38 CDT 2009 Pekka Pessi * nta_incoming_create_response(): sanitized oom check git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13345 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/nta/nta.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 3f93b0eb44..9cd9f3a75e 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Fri May 15 11:11:24 CDT 2009 +Fri May 15 11:12:29 CDT 2009 diff --git a/libs/sofia-sip/libsofia-sip-ua/nta/nta.c b/libs/sofia-sip/libsofia-sip-ua/nta/nta.c index 7c062f7039..a16062f084 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nta/nta.c +++ b/libs/sofia-sip/libsofia-sip-ua/nta/nta.c @@ -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;