changeset 16077:ce85859d2f41

merge of '2b84a8b2d83491cd54feb1e1d9ee5ce1a4c153af' and 'e05642d9d762c1c9dfd2d19ae5c0e6b5a61ad3f1'
author Mark Doliner <mark@kingant.net>
date Thu, 12 Apr 2007 05:26:43 +0000
parents e36cd821c879 (current diff) 0db4eca4a3e0 (diff)
children 783b05e528b0
files
diffstat 1 files changed, 7 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }