mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-02 03:09:23 +00:00
Fix memory leaks (LIME related)
This commit is contained in:
parent
959cbc5ab8
commit
60cadbb6c6
2 changed files with 7 additions and 1 deletions
|
|
@ -195,6 +195,8 @@ void sal_process_incoming_message(SalOp *op,const belle_sip_request_event_t *eve
|
|||
salmsg.message_id=message_id;
|
||||
salmsg.time=date ? belle_sip_header_date_get_time(date) : time(NULL);
|
||||
op->base.root->callbacks.text_received(op,&salmsg);
|
||||
|
||||
free(decryptedMessage);
|
||||
belle_sip_object_unref(address);
|
||||
belle_sip_free(from);
|
||||
if (salmsg.url) ms_free((char*)salmsg.url);
|
||||
|
|
@ -230,6 +232,7 @@ int sal_message_send(SalOp *op, const char *from, const char *to, const char* co
|
|||
size_t content_length = msg?strlen(msg):0;
|
||||
time_t curtime=time(NULL);
|
||||
uint8_t *multipartEncryptedMessage = NULL;
|
||||
int retval;
|
||||
|
||||
if (op->dialog){
|
||||
/*for SIP MESSAGE that are sent in call's dialog*/
|
||||
|
|
@ -303,8 +306,10 @@ int sal_message_send(SalOp *op, const char *from, const char *to, const char* co
|
|||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(req),BELLE_SIP_HEADER(belle_sip_header_content_length_create(content_length)));
|
||||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(req),BELLE_SIP_HEADER(belle_sip_header_date_create_from_time(&curtime)));
|
||||
belle_sip_message_set_body(BELLE_SIP_MESSAGE(req),(multipartEncryptedMessage==NULL)?msg:(const char *)multipartEncryptedMessage,content_length);
|
||||
return sal_op_send_request(op,req);
|
||||
retval = sal_op_send_request(op,req);
|
||||
free(multipartEncryptedMessage);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
int sal_message_reply(SalOp *op, SalReason reason){
|
||||
|
|
|
|||
|
|
@ -228,6 +228,7 @@ static void linphone_chat_message_process_response_from_post_file(void *data, co
|
|||
/* add the node containing the key to the file-info node */
|
||||
xmlNewTextChild(cur, NULL, (const xmlChar *)"file-key", (const xmlChar *)keyb64);
|
||||
xmlFree(typeAttribute);
|
||||
free(keyb64);
|
||||
|
||||
/* look for the file-name node and update its content */
|
||||
while (fileInfoNodeChildren!=NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue