changeset 26228:f4161d588b25

Fix a potential memleak by freeing this regardless of whether hasActions is set
author Mark Doliner <mark@kingant.net>
date Fri, 27 Mar 2009 09:36:38 +0000
parents 58daeb191c10
children af3cabc8746e
files libpurple/protocols/jabber/xdata.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/xdata.c	Fri Mar 27 09:34:27 2009 +0000
+++ b/libpurple/protocols/jabber/xdata.c	Fri Mar 27 09:36:38 2009 +0000
@@ -153,11 +153,12 @@
 	}
 	g_free(data);
 
-	if (hasActions) {
+	if (hasActions)
 		cb(js, result, actionhandle, user_data);
-		g_free(actionhandle);
-	} else
+	else
 		((jabber_x_data_cb)cb)(js, result, user_data);
+
+	g_free(actionhandle);
 }
 
 static void jabber_x_data_cancel_cb(struct jabber_x_data_data *data, PurpleRequestFields *fields) {