changeset 13630:bbc56ff2bd62

[gaim-migrate @ 16017] Leak fix. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 12 Apr 2006 01:51:57 +0000
parents 3275a0f675e2
children 35b7b1ae809a
files src/protocols/msn/httpconn.c
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/httpconn.c	Wed Apr 12 01:18:56 2006 +0000
+++ b/src/protocols/msn/httpconn.c	Wed Apr 12 01:51:57 2006 +0000
@@ -329,6 +329,7 @@
 
 	close(httpconn->fd);
 
+	g_free(httpconn->rx_buf);
 	httpconn->rx_buf = NULL;
 	httpconn->rx_len = 0;
 
@@ -394,8 +395,7 @@
 		return;
 	}
 
-	if (httpconn->rx_buf != NULL)
-		g_free(httpconn->rx_buf);
+	g_free(httpconn->rx_buf);
 	httpconn->rx_buf = NULL;
 	httpconn->rx_len = 0;
 
@@ -733,18 +733,15 @@
 
 		if (!wasted)
 		{
-			if (httpconn->full_session_id != NULL)
-				g_free(httpconn->full_session_id);
+			g_free(httpconn->full_session_id);
 
 			httpconn->full_session_id = full_session_id;
 
-			if (httpconn->session_id != NULL)
-				g_free(httpconn->session_id);
+			g_free(httpconn->session_id);
 
 			httpconn->session_id = session_id;
 
-			if (httpconn->host != NULL)
-				g_free(httpconn->host);
+			g_free(httpconn->host);
 
 			httpconn->host = gw_ip;
 		}