cpw.malu.xmpp.idle: 55b38293: Oops, unleak...

malu at pidgin.im malu at pidgin.im
Sun Nov 16 17:50:44 EST 2008


-----------------------------------------------------------------
Revision: 55b38293286019fcf5a5cee91abd629d28437f21
Ancestor: 4def82270f4601da28a42de74b29d1ab0046be3e
Author: malu at pidgin.im
Date: 2008-11-16T22:45:11
Branch: im.pidgin.cpw.malu.xmpp.idle
URL: http://d.pidgin.im/viewmtn/revision/info/55b38293286019fcf5a5cee91abd629d28437f21

Modified files:
        libpurple/protocols/jabber/presence.c

ChangeLog: 

Oops, unleak...

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/presence.c	386e5b34c3882ed4a0b9524c84a6956fe36c2ee1
+++ libpurple/protocols/jabber/presence.c	9d535d5f8c63b53123296d552478dcc386c22bef
@@ -264,7 +264,8 @@ xmlnode *jabber_presence_create_js(Jabbe
 	/* if we are idle and not offline, include idle */
 	if (js->idle && state != JABBER_BUDDY_STATE_UNAVAILABLE) {
 		xmlnode *query = xmlnode_new_child(presence, "query");
-		gchar *seconds = g_strdup_printf("%d", (int) (time(NULL) - js->idle));
+		gchar seconds[10];
+		g_sprintf(seconds, "%d", (int) (time(NULL) - js->idle));
 		
 		xmlnode_set_namespace(query, "jabber:iq:last");
 		xmlnode_set_attrib(query, "seconds", seconds);


More information about the Commits mailing list