diff libpurple/protocols/jabber/presence.c @ 17840:6e0961356343

Don't check for null before calling free. I can't help but get rid of these when I see them.
author Mark Doliner <mark@kingant.net>
date Tue, 12 Jun 2007 07:30:24 +0000
parents d495103dcf88
children 641db7354235
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c	Tue Jun 12 05:22:44 2007 +0000
+++ b/libpurple/protocols/jabber/presence.c	Tue Jun 12 07:30:24 2007 +0000
@@ -379,8 +379,7 @@
 			} else if(xmlns && !strcmp(xmlns, "vcard-temp:x:update")) {
 				xmlnode *photo = xmlnode_get_child(y, "photo");
 				if(photo) {
-					if(avatar_hash)
-						g_free(avatar_hash);
+					g_free(avatar_hash);
 					avatar_hash = xmlnode_get_data(photo);
 				}
 			}
@@ -409,8 +408,7 @@
 			jabber_id_free(jid);
 			g_free(status);
 			g_free(room_jid);
-			if(avatar_hash)
-				g_free(avatar_hash);
+			g_free(avatar_hash);
 			return;
 		}
 
@@ -426,8 +424,7 @@
 				jabber_id_free(jid);
 				g_free(status);
 				g_free(room_jid);
-				if(avatar_hash)
-					g_free(avatar_hash);
+				g_free(avatar_hash);
 				return;
 			}
 
@@ -568,8 +565,7 @@
 	}
 	g_free(status);
 	jabber_id_free(jid);
-	if(avatar_hash)
-		g_free(avatar_hash);
+	g_free(avatar_hash);
 }
 
 void jabber_presence_subscription_set(JabberStream *js, const char *who, const char *type)