From d1c3da96f2b058c1ecd4cbeb31aae97dcc128ae1 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Sat, 15 Apr 2017 23:32:56 +0200 Subject: [PATCH] fix memory leak and avoid 3 internal deprecated warnings --- coreapi/linphonecall.c | 2 +- coreapi/linphonecore.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index e1e0ccf1a..b0287cc0a 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -5211,7 +5211,7 @@ LinphoneStatus linphone_call_decline(LinphoneCall * call, LinphoneReason reason) LinphoneErrorInfo *ei = linphone_error_info_new(); linphone_error_info_set(ei, "SIP", reason,linphone_reason_to_error_code(reason), NULL, NULL); status = linphone_call_decline_with_error_info(call, ei); - + linphone_error_info_unref(ei); return status; } diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index ee791ca70..45a996832 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -6061,15 +6061,15 @@ bool_t linphone_core_get_ring_during_incoming_early_media(const LinphoneCore *lc } static OrtpPayloadType* _linphone_core_find_payload_type(LinphoneCore* lc, const char* type, int rate, int channels) { - OrtpPayloadType* result = find_payload_type_from_list(type, rate, channels, linphone_core_get_audio_codecs(lc)); + OrtpPayloadType* result = find_payload_type_from_list(type, rate, channels, lc->codecs_conf.audio_codecs); if (result) { return result; } else { - result = find_payload_type_from_list(type, rate, 0, linphone_core_get_video_codecs(lc)); + result = find_payload_type_from_list(type, rate, 0, lc->codecs_conf.video_codecs); if (result) { return result; } else { - result = find_payload_type_from_list(type, rate, 0, linphone_core_get_text_codecs(lc)); + result = find_payload_type_from_list(type, rate, 0, lc->codecs_conf.text_codecs); if (result) { return result; }