changeset 20832:c6f601a8eeba

Fix leak when initializing msn soap request.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 08 Oct 2007 15:34:58 +0000
parents 09b06f6769ee
children 062ed5f59ada
files libpurple/protocols/msn/soap.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/soap.c	Mon Oct 08 14:45:01 2007 +0000
+++ b/libpurple/protocols/msn/soap.c	Mon Oct 08 15:34:58 2007 +0000
@@ -131,6 +131,7 @@
 				MsnSoapSslErrorCbFunction error_cb)
 {
 	purple_debug_misc("MSN SOAP","Initializing SOAP connection\n");
+	g_free(soapconn->login_host);
 	soapconn->login_host = g_strdup(host);
 	soapconn->ssl_conn = ssl;
 	soapconn->connect_cb = connect_cb;
@@ -204,11 +205,9 @@
 void
 msn_soap_destroy(MsnSoapConn *soapconn)
 {
-	if(soapconn->login_host)
-		g_free(soapconn->login_host);
+	g_free(soapconn->login_host);
 
-	if(soapconn->login_path)
-		g_free(soapconn->login_path);
+	g_free(soapconn->login_path);
 
 	/*remove the write handler*/
 	if (soapconn->output_handler > 0){