diff options
author | rbuj <[email protected]> | 2021-10-21 19:52:07 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-07-03 13:04:42 +0200 |
commit | 9a604a23ed746699fc5b708b59bd504593eeaee3 (patch) | |
tree | 3c7fe329a7bad9697f25e5898852fe57623e6694 | |
parent | e1ecada881e400c534a136135a48851c61ff3d1d (diff) | |
download | caja-9a604a23ed746699fc5b708b59bd504593eeaee3.tar.bz2 caja-9a604a23ed746699fc5b708b59bd504593eeaee3.tar.xz |
caja-mime-actions: fix memory leak
-rw-r--r-- | libcaja-private/caja-mime-actions.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libcaja-private/caja-mime-actions.c b/libcaja-private/caja-mime-actions.c index 83ca70b9..f3680193 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; |