# HG changeset patch
# User Sean Egan <seanegan@gmail.com>
# Date 1189467951 0
# Node ID 5c419cd2cd220699ec7446091488ea0e58fc17b3
# Parent  e5b8270375346a15001f2e2737a3e275f20e30c8
Fix crash in XMPP capabilities

diff -r e5b827037534 -r 5c419cd2cd22 libpurple/protocols/jabber/caps.c
--- a/libpurple/protocols/jabber/caps.c	Mon Sep 10 21:19:37 2007 +0000
+++ b/libpurple/protocols/jabber/caps.c	Mon Sep 10 23:45:51 2007 +0000
@@ -474,13 +474,13 @@
 	userdata->ver = g_strdup(ver);
 
 	if(originalext) {
-		gchar **tmp;
+		int i;
 		gchar **splat = g_strsplit(originalext, " ", 0);
-		for(tmp = splat; *tmp; tmp++) {
-			userdata->ext = g_list_append(userdata->ext, tmp);
+		for(i =0; splat[i]; i++) {
+			userdata->ext = g_list_append(userdata->ext, g_strdup(splat[i]));
 			++userdata->extOutstanding;
 		}
-		g_free(splat);
+		g_strfreev(splat);
 	}
 	g_free(originalext);