Commit 5fd365c3 authored by Pekka Pessi's avatar Pekka Pessi

nua: fixed memory leak in nua_ack()

darcs-hash:20070124170929-65a35-3867227e0e93479b564f63b867b421a5ee65ae0f.gz
parent 68ceb290
...@@ -975,6 +975,8 @@ int nua_invite_client_ack(nua_client_request_t *cr, tagi_t const *tags) ...@@ -975,6 +975,8 @@ int nua_invite_client_ack(nua_client_request_t *cr, tagi_t const *tags)
wa = sip_authorization(sip); wa = sip_authorization(sip);
pa = sip_proxy_authorization(sip); pa = sip_proxy_authorization(sip);
msg_destroy(msg);
msg = nta_msg_create(nh->nh_nua->nua_nta, 0); msg = nta_msg_create(nh->nh_nua->nua_nta, 0);
sip = sip_object(msg); sip = sip_object(msg);
if (!msg) if (!msg)
......
...@@ -2075,7 +2075,7 @@ int nua_client_request_try(nua_client_request_t *cr) ...@@ -2075,7 +2075,7 @@ int nua_client_request_try(nua_client_request_t *cr)
if (!error) if (!error)
return 0; return 0;
if (error > -2) if (error == -1)
msg_destroy(msg); msg_destroy(msg);
} }
...@@ -2090,7 +2090,8 @@ int nua_client_request_try(nua_client_request_t *cr) ...@@ -2090,7 +2090,8 @@ int nua_client_request_try(nua_client_request_t *cr)
* *
* @retval 0 if request is pending * @retval 0 if request is pending
* @retval >=1 if error event has been sent * @retval >=1 if error event has been sent
* @retval -1 if error occurred but event has not been sent * @retval -1 if error occurred but event has not been sent,
and @a msg has not been destroyed
* @retval -2 if error occurred, event has not been sent, * @retval -2 if error occurred, event has not been sent,
* but @a msg has been destroyed * but @a msg has been destroyed
*/ */
...@@ -2232,7 +2233,7 @@ int nua_base_client_request(nua_client_request_t *cr, msg_t *msg, sip_t *sip, ...@@ -2232,7 +2233,7 @@ int nua_base_client_request(nua_client_request_t *cr, msg_t *msg, sip_t *sip,
msg, msg,
TAG_NEXT(tags)); TAG_NEXT(tags));
return cr->cr_orq ? 0 : -2; return cr->cr_orq ? 0 : -1;
} }
/** Callback for nta client transaction */ /** Callback for nta client transaction */
......
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