diff src/protocols/msn/notification.c @ 6827:1cfbb731aa1f

[gaim-migrate @ 7372] Several fixes for attempted NULL pointer frees, and some MSNSLP fixes. Still not ready for use yet. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 14 Sep 2003 01:59:09 +0000
parents 8f228a7d5076
children cdcb43229e33
line wrap: on
line diff
--- a/src/protocols/msn/notification.c	Sat Sep 13 23:28:08 2003 +0000
+++ b/src/protocols/msn/notification.c	Sun Sep 14 01:59:09 2003 +0000
@@ -134,9 +134,12 @@
 		char *new_buffer = g_new(char, size + s + 1);
 
 		if (buffer != NULL)
+		{
 			strncpy(new_buffer, buffer, size);
 
-		g_free(buffer);
+			g_free(buffer);
+		}
+
 		buffer = new_buffer;
 
 		strncpy(buffer + size, temp_buf, s);
@@ -516,8 +519,12 @@
 	}
 
 	g_free(request_str);
-	g_free(session->ssl_url);
-	session->ssl_url = NULL;
+
+	if (session->ssl_url != NULL)
+	{
+		g_free(session->ssl_url);
+		session->ssl_url = NULL;
+	}
 
 	/* Get the PassportURLs line. */
 	if ((s = msn_ssl_read(gsc, &buffer)) <= 0)