diff libpurple/protocols/myspace/message.h @ 24799:c044eb54b7ac

Fix a leak in myspace prpl. In myspace.c:msim_process_reply, the clone of 'msg' sent to the callbacks were never freed. Also, do not unnecessarily dup a static string (which needs to be marked for translation after the string freeze).
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 17 Dec 2008 20:50:49 +0000
parents c1c464583f8c
children
line wrap: on
line diff
--- a/libpurple/protocols/myspace/message.h	Wed Dec 17 18:36:31 2008 +0000
+++ b/libpurple/protocols/myspace/message.h	Wed Dec 17 20:50:49 2008 +0000
@@ -93,14 +93,14 @@
 
 MsimMessage *msim_parse(const gchar *raw);
 
-MsimMessageElement *msim_msg_get(MsimMessage *msg, const gchar *name);
+MsimMessageElement *msim_msg_get(const MsimMessage *msg, const gchar *name);
 
 /* Retrieve data by name */
-gchar *msim_msg_get_string(MsimMessage *msg, const gchar *name);
-GList *msim_msg_get_list(MsimMessage *msg, const gchar *name);
-MsimMessage *msim_msg_get_dictionary(MsimMessage *msg, const gchar *name);
-guint msim_msg_get_integer(MsimMessage *msg, const gchar *name);
-gboolean msim_msg_get_binary(MsimMessage *msg, const gchar *name, gchar **binary_data, gsize *binary_length);
+gchar *msim_msg_get_string(const MsimMessage *msg, const gchar *name);
+GList *msim_msg_get_list(const MsimMessage *msg, const gchar *name);
+MsimMessage *msim_msg_get_dictionary(const MsimMessage *msg, const gchar *name);
+guint msim_msg_get_integer(const MsimMessage *msg, const gchar *name);
+gboolean msim_msg_get_binary(const MsimMessage *msg, const gchar *name, gchar **binary_data, gsize *binary_length);
 
 /* Retrieve data by element (MsimMessageElement *), returned from msim_msg_get() */
 gchar *msim_msg_get_string_from_element(MsimMessageElement *elem);