From a25dde8752fb39736f8f5ee2607d56840d6aabbb Mon Sep 17 00:00:00 2001
From: smorlat <smorlat@3f6dc0c8-ddfe-455d-9043-3cd528dc4637>
Date: Mon, 4 Jan 2010 11:20:24 +0000
Subject: [PATCH] fix linphone_core_clear_proxy_config

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@800 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
---
 linphone/coreapi/proxy.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/linphone/coreapi/proxy.c b/linphone/coreapi/proxy.c
index 9278279e9e..46d0bf1c7c 100644
--- a/linphone/coreapi/proxy.c
+++ b/linphone/coreapi/proxy.c
@@ -563,10 +563,11 @@ void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cf
  * @ingroup proxy
 **/
 void linphone_core_clear_proxy_config(LinphoneCore *lc){
-	const MSList* list=linphone_core_get_proxy_config_list((const LinphoneCore*)lc);
+	MSList* list=ms_list_copy(linphone_core_get_proxy_config_list((const LinphoneCore*)lc));
 	for(;list!=NULL;list=list->next){
-                linphone_core_remove_proxy_config(lc,(LinphoneProxyConfig *)list->data);
-        }
+		linphone_core_remove_proxy_config(lc,(LinphoneProxyConfig *)list->data);
+	}
+	ms_list_free(list);
 }
 /**
  * Sets the default proxy.
-- 
GitLab