summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-11-08 19:25:05 +0100
committerrbuj <[email protected]>2021-12-31 13:14:00 +0100
commitfd8210a4a08c0e57cd2744d484d2662227b25808 (patch)
treea8ddc6d3ad0d537c1f2b0500b37f3786689bf940 /src
parent5ce0d61fbea4a72993847c308c4098048974156d (diff)
downloadcaja-fd8210a4a08c0e57cd2744d484d2662227b25808.tar.bz2
caja-fd8210a4a08c0e57cd2744d484d2662227b25808.tar.xz
fm-directory-view: fix memory leak
Diffstat (limited to 'src')
-rw-r--r--src/file-manager/fm-directory-view.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 7431c963..db656b98 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -4730,6 +4730,7 @@ reset_open_with_menu (FMDirectoryView *view, GList *selection)
GtkUIManager *ui_manager;
GtkAction *action;
GAppInfo *default_app;
+ char *uri;
/* Clear any previous inserted items in the applications and viewers placeholders */
@@ -4811,12 +4812,15 @@ reset_open_with_menu (FMDirectoryView *view, GList *selection)
}
/* Show open parent folder action if we are in search mode */
- if (eel_uri_is_search (fm_directory_view_get_uri (view)) && g_list_length (selection) == 1)
+ uri = fm_directory_view_get_uri (view);
+ if (eel_uri_is_search (uri) && g_list_length (selection) == 1)
add_parent_folder_to_open_menu (view,
selection,
FM_DIRECTORY_VIEW_MENU_PATH_OPEN,
FM_DIRECTORY_VIEW_POPUP_PATH_OPEN);
+ g_free (uri);
+
open_with_chooser_visible = other_applications_visible &&
g_list_length (selection) == 1;