Commit f0b384b1 authored by Pekka Pessi's avatar Pekka Pessi

nta_incoming_create_response(): sanitized oom check

Ignore-this: 6c033709b83aa29cdfc08135cce03c24

darcs-hash:20090513173538-db55f-f44796ae3f616f55afb5aa27ba8e32686dd013a3.gz
parent 1394cc80
......@@ -6383,11 +6383,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment