summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-mime-actions.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-21 19:52:07 +0200
committerLuke from DC <[email protected]>2021-12-19 12:03:59 +0000
commitfba56a1d49debccb1174ce7f7abbef521116f034 (patch)
treedee490b4743ec115e766bd98bc6adfd66e2d176c /libcaja-private/caja-mime-actions.c
parent2d6aece44339a410848645b63b225b3f937c1ec2 (diff)
downloadcaja-fba56a1d49debccb1174ce7f7abbef521116f034.tar.bz2
caja-fba56a1d49debccb1174ce7f7abbef521116f034.tar.xz
caja-mime-actions: fix memory leak
Diffstat (limited to 'libcaja-private/caja-mime-actions.c')
-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 252ee60e..b434a06a 100644
--- a/libcaja-private/caja-mime-actions.c
+++ b/libcaja-private/caja-mime-actions.c
@@ -1356,7 +1356,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,
@@ -1510,6 +1514,7 @@ pk_proxy_appeared_cb (GObject *source,
{
ActivateParametersInstall *parameters_install = user_data;
char *mime_type;
+ char *description;
char *error_message;
GtkWidget *dialog;
GDBusProxy *proxy;
@@ -1539,10 +1544,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;