Commit 20a5c21e authored by Ghislain MARY's avatar Ghislain MARY

Fix memory leak of some strings extracted from XML documents.

parent 23ba230d
......@@ -845,6 +845,10 @@ static void process_im_is_composing_notification(LinphoneChatRoom *cr, xmlparsin
cr->remote_is_composing = state;
linphone_core_notify_is_composing_received(cr->lc, cr);
linphone_free_xml_text_content(state_str);
}
if (refresh_str != NULL) {
linphone_free_xml_text_content(refresh_str);
}
}
......
......@@ -1211,19 +1211,15 @@ static int process_pidf_xml_presence_services(xmlparsing_context_t *xml_ctx, Lin
service_id_str = linphone_get_xml_text_content(xml_ctx, xpath_str);
service = presence_service_new(service_id_str, basic_status);
if (service != NULL) {
if (timestamp_str != NULL) {
presence_service_set_timestamp(service, parse_timestamp(timestamp_str));
linphone_free_xml_text_content(timestamp_str);
}
if (contact_str != NULL) {
linphone_presence_service_set_contact(service, contact_str);
linphone_free_xml_text_content(contact_str);
}
if (timestamp_str != NULL) presence_service_set_timestamp(service, parse_timestamp(timestamp_str));
if (contact_str != NULL) linphone_presence_service_set_contact(service, contact_str);
process_pidf_xml_presence_service_notes(xml_ctx, service, i);
linphone_presence_model_add_service(model, service);
}
linphone_free_xml_text_content(basic_status_str);
if (timestamp_str != NULL) linphone_free_xml_text_content(timestamp_str);
if (contact_str != NULL) linphone_free_xml_text_content(contact_str);
if (service_id_str != NULL) linphone_free_xml_text_content(service_id_str);
linphone_free_xml_text_content(basic_status_str);
}
}
if (service_object != NULL) xmlXPathFreeObject(service_object);
......
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