libpurple/protocols/jabber/pep.c

branch
soc.2007.xmpp
changeset 17774
fdb76fddd16a
parent 17773
6956b763b3d1
child 17775
1df27cab581c
--- a/libpurple/protocols/jabber/pep.c	Wed Jun 06 02:07:53 2007 +0000
+++ b/libpurple/protocols/jabber/pep.c	Sun Jun 10 12:22:39 2007 +0000
@@ -34,10 +34,9 @@
 }
 
 void jabber_pep_register_handler(const char *shortname, const char *xmlns, JabberPEPHandler handlerfunc) {
-    char *notifyns = malloc(strlen(xmlns) + 8);
-    sprintf(notifyns,"%s+notify", xmlns);
+    gchar *notifyns = g_strdup_printf("%s+notify", xmlns);
     jabber_add_feature(shortname, notifyns);
-    free(notifyns);
+    g_free(notifyns);
 	g_hash_table_replace(pep_handlers, g_strdup(xmlns), handlerfunc);
 }
 

mercurial