summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-21 19:52:07 +0200
committerraveit65 <[email protected]>2022-07-21 19:35:33 +0200
commit01800b20ca7cb81beed075c81eab197a8cfaf394 (patch)
treeebca47a627b53d517f2ea4a743188152fd773880
parent23d4907f4a2b4692daa868b47eab2a2b0c90cede (diff)
downloadcaja-01800b20ca7cb81beed075c81eab197a8cfaf394.tar.bz2
caja-01800b20ca7cb81beed075c81eab197a8cfaf394.tar.xz
caja-mime-actions: fix memory leak
-rw-r--r--libcaja-private/caja-mime-actions.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libcaja-private/caja-mime-actions.c b/libcaja-private/caja-mime-actions.c
index cf302f8a..0d518817 100644
--- a/libcaja-private/caja-mime-actions.c
+++ b/libcaja-private/caja-mime-actions.c
@@ -1365,7 +1365,11 @@ show_unhandled_type_error (ActivateParametersInstall *parameters)
NULL);
} else {
char *text;
- text = g_strdup_printf (_("There is no application installed for %s files"), g_content_type_get_description (mime_type));
+ char *description;
+
+ description = g_content_type_get_description (mime_type);
+ text = g_strdup_printf (_("There is no application installed for %s files"), description);
+ g_free (description);
dialog = gtk_message_dialog_new (parameters->parent_window,
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -1519,6 +1523,7 @@ pk_proxy_appeared_cb (GObject *source,
{
ActivateParametersInstall *parameters_install = user_data;
char *mime_type;
+ char *description;
char *error_message;
GtkWidget *dialog;
GDBusProxy *proxy;
@@ -1548,10 +1553,12 @@ pk_proxy_appeared_cb (GObject *source,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_YES_NO,
"%s", error_message);
+ description = g_content_type_get_description (mime_type);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
_("There is no application installed for %s files.\n"
"Do you want to search for an application to open this file?"),
- g_content_type_get_description (mime_type));
+ description);
+ g_free (description);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
parameters_install->dialog = dialog;