# HG changeset patch # User Mark Doliner # Date 1176355603 0 # Node ID ce85859d2f414e9a5cc93f4b7f55cff166e11225 # Parent e36cd821c8794e784889a93f24e6f47dde106818# Parent 0db4eca4a3e06018a3553bedfb2b5bd15fc30bed merge of '2b84a8b2d83491cd54feb1e1d9ee5ce1a4c153af' and 'e05642d9d762c1c9dfd2d19ae5c0e6b5a61ad3f1' diff -r e36cd821c879 -r ce85859d2f41 libpurple/protocols/jabber/xdata.c --- a/libpurple/protocols/jabber/xdata.c Thu Apr 12 00:50:13 2007 +0000 +++ b/libpurple/protocols/jabber/xdata.c Thu Apr 12 05:26:43 2007 +0000 @@ -200,8 +200,7 @@ g_hash_table_replace(data->fields, g_strdup(var), GINT_TO_POINTER(JABBER_X_DATA_TEXT_SINGLE)); - if(value) - g_free(value); + g_free(value); } else if(!strcmp(type, "text-multi") || !strcmp(type, "jid-multi")) { GString *str = g_string_new(""); @@ -283,8 +282,7 @@ g_hash_table_replace(data->fields, g_strdup(var), GINT_TO_POINTER(JABBER_X_DATA_BOOLEAN)); - if(value) - g_free(value); + g_free(value); } else if(!strcmp(type, "fixed") && value) { if((valuenode = xmlnode_get_child(fn, "value"))) value = xmlnode_get_data(valuenode); @@ -292,8 +290,7 @@ field = purple_request_field_label_new("", value); purple_request_field_group_add_field(group, field); - if(value) - g_free(value); + g_free(value); } else if(!strcmp(type, "hidden")) { if((valuenode = xmlnode_get_child(fn, "value"))) value = xmlnode_get_data(valuenode); @@ -305,8 +302,7 @@ g_hash_table_replace(data->fields, g_strdup(var), GINT_TO_POINTER(JABBER_X_DATA_TEXT_SINGLE)); - if(value) - g_free(value); + g_free(value); } else { /* text-single, jid-single, and the default */ if((valuenode = xmlnode_get_child(fn, "value"))) value = xmlnode_get_data(valuenode); @@ -322,8 +318,7 @@ g_hash_table_replace(data->fields, g_strdup(var), GINT_TO_POINTER(JABBER_X_DATA_TEXT_SINGLE)); } - if(value) - g_free(value); + g_free(value); } } @@ -337,10 +332,8 @@ _("OK"), G_CALLBACK(jabber_x_data_ok_cb), _("Cancel"), G_CALLBACK(jabber_x_data_cancel_cb), data); - if(title) - g_free(title); - if(instructions) - g_free(instructions); + g_free(title); + g_free(instructions); return handle; }