diff --git a/coreapi/bellesip_sal/sal_op_presence.c b/coreapi/bellesip_sal/sal_op_presence.c index 321f2e0ac..a818fd511 100644 --- a/coreapi/bellesip_sal/sal_op_presence.c +++ b/coreapi/bellesip_sal/sal_op_presence.c @@ -41,6 +41,7 @@ void sal_add_presence_info(SalOp *op, belle_sip_message_t *notify, SalPresenceMo ,BELLE_SIP_HEADER(belle_sip_header_content_length_create(content_length=strlen(content)))); belle_sip_message_set_body(BELLE_SIP_MESSAGE(notify),content,content_length); ms_free(contact_info); + ms_free(content); } static void presence_process_io_error(void *user_ctx, const belle_sip_io_error_event_t *event){ diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 605521552..95d0e5d83 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5490,6 +5490,8 @@ static void linphone_core_uninit(LinphoneCore *lc) if (lc->friends) /* FIXME we should wait until subscription to complete*/ ms_list_for_each(lc->friends,(void (*)(void *))linphone_friend_close_subscriptions); + if (lc->presence_model) + linphone_presence_model_delete(lc->presence_model); linphone_core_set_state(lc,LinphoneGlobalShutdown,"Shutting down"); #ifdef VIDEO_ENABLED if (lc->previewstream!=NULL){ diff --git a/coreapi/presence.c b/coreapi/presence.c index a002d5c49..67bbe666f 100644 --- a/coreapi/presence.c +++ b/coreapi/presence.c @@ -991,6 +991,7 @@ static int process_pidf_xml_presence_person_activities(xmlparsing_context_t *xml } } } + if (activities_object != NULL) xmlXPathFreeObject(activities_object); if (err < 0) break; } }