diff src/protocols/msn/msn.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 b4fe4c1023c6
children f03c0085c424
line wrap: on
line diff
--- a/src/protocols/msn/msn.c	Sat Sep 13 23:28:08 2003 +0000
+++ b/src/protocols/msn/msn.c	Sun Sep 14 01:59:09 2003 +0000
@@ -19,6 +19,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+#include <glib.h>
+static void (*real_g_free)(gpointer) = g_free;
+
 #include "msn.h"
 #include "accountopt.h"
 #include "msg.h"
@@ -36,6 +39,17 @@
 
 static char *msn_normalize(const char *str);
 
+void
+msn_free(void *ptr, const char *filename, int line)
+{
+	gaim_debug_misc("msn", "Freeing pointer %p at %s:%d\n",
+					ptr, filename, line);
+	if (ptr == NULL)
+		abort();
+
+	real_g_free(ptr);
+}
+
 typedef struct
 {
 	GaimConnection *gc;