From cac2bc4d9595b6913dc45e617d2c57391f9db2d8 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 1 Jun 2016 17:06:20 +0200 Subject: [PATCH] Add missing nat policy ref. --- coreapi/linphonecore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index eb4cab7e9..12f9b87cc 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5199,7 +5199,7 @@ void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy char *stun_server_username = NULL; if (lc->nat_policy != NULL) { - nat_policy = lc->nat_policy; + nat_policy = linphone_nat_policy_ref(lc->nat_policy); stun_server = ms_strdup(linphone_nat_policy_get_stun_server(nat_policy)); stun_server_username = ms_strdup(linphone_nat_policy_get_stun_server_username(nat_policy)); linphone_nat_policy_clear(nat_policy);