summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormbkma <[email protected]>2026-03-11 23:47:42 +0100
committerVictor Kareh <[email protected]>2026-03-12 12:24:41 -0400
commit6123e3886e9b65891a8b1bf7bb11425a4d98200c (patch)
treee947e7dee4b0782d5acd5849d8fd25d10fc415ce /src
parentf264171de8a195fcfa5315948fea584c4810a063 (diff)
downloadcaja-6123e3886e9b65891a8b1bf7bb11425a4d98200c.tar.bz2
caja-6123e3886e9b65891a8b1bf7bb11425a4d98200c.tar.xz
fix memleaks
Diffstat (limited to 'src')
-rw-r--r--src/caja-bookmarks-sidebar.c9
-rw-r--r--src/caja-history-sidebar.c1
-rw-r--r--src/caja-query-editor.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/src/caja-bookmarks-sidebar.c b/src/caja-bookmarks-sidebar.c
index 57aa563d..61709e35 100644
--- a/src/caja-bookmarks-sidebar.c
+++ b/src/caja-bookmarks-sidebar.c
@@ -231,6 +231,7 @@ open_selected_item (CajaBookmarksSidebar *sidebar,
flags, NULL);
g_object_unref (location);
+ g_object_unref (bookmark);
}
static void
@@ -333,11 +334,14 @@ loading_uri_callback (CajaWindowInfo *window,
if (strcmp (uri, location) == 0)
{
g_free (uri);
+ g_object_unref (bookmark);
gtk_tree_selection_select_iter (selection, &iter);
break;
}
g_free (uri);
}
+ if (bookmark)
+ g_object_unref (bookmark);
valid = gtk_tree_model_iter_next (model, &iter);
}
}
@@ -368,8 +372,9 @@ is_row_selectable (GtkTreeSelection *selection,
if (bookmark == NULL)
return FALSE;
- else
- return TRUE;
+
+ g_object_unref (bookmark);
+ return TRUE;
}
static void
diff --git a/src/caja-history-sidebar.c b/src/caja-history-sidebar.c
index cc3b9202..94281aff 100644
--- a/src/caja-history-sidebar.c
+++ b/src/caja-history-sidebar.c
@@ -162,6 +162,7 @@ open_selected_item (CajaHistorySidebar *sidebar,
location, CAJA_WINDOW_OPEN_ACCORDING_TO_MODE,
flags, NULL);
g_object_unref (location);
+ g_object_unref (bookmark);
}
static void
diff --git a/src/caja-query-editor.c b/src/caja-query-editor.c
index b4f96179..fb49a95f 100644
--- a/src/caja-query-editor.c
+++ b/src/caja-query-editor.c
@@ -818,6 +818,8 @@ type_combo_changed (GtkComboBox *combo_box, CajaQueryEditorRow *row)
-1);
type_add_custom_type (row, mimetype, description, &iter);
+ g_free (description);
+ g_free (mimetype);
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (row->type_widget),
&iter);
}