summaryrefslogtreecommitdiff
path: root/sendto
diff options
context:
space:
mode:
authorMonsta <[email protected]>2014-11-09 13:01:35 +0300
committerStefano Karapetsas <[email protected]>2014-12-17 09:02:59 +0100
commit60344f7a79d41ae6f0af41dd786a6918493580bd (patch)
treefda6d4336168029434841f3bc9303b28e9fed5ab /sendto
parent5e1422020c005f8fa9bcc93e1a3956ff4039f958 (diff)
downloadcaja-extensions-60344f7a79d41ae6f0af41dd786a6918493580bd.tar.bz2
caja-extensions-60344f7a79d41ae6f0af41dd786a6918493580bd.tar.xz
gajim plugin: don't leak memory
Diffstat (limited to 'sendto')
-rw-r--r--sendto/plugins/gajim/gajim.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sendto/plugins/gajim/gajim.c b/sendto/plugins/gajim/gajim.c
index bb00d1d..93aff8a 100644
--- a/sendto/plugins/gajim/gajim.c
+++ b/sendto/plugins/gajim/gajim.c
@@ -386,16 +386,18 @@ static void
show_error (const gchar *title, const gchar *message)
{
GtkWidget *dialog;
-
+
dialog = gtk_message_dialog_new_with_markup(NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE, NULL);
- gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog),
- g_markup_printf_escaped("<b>%s</b>\n\n%s", title, message));
+
+ gchar *msg = g_markup_printf_escaped("<b>%s</b>\n\n%s", title, message);
+ gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), msg);
+ g_free (msg);
+
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
+ gtk_widget_destroy (dialog);
}
static gboolean