Skip to content

Commit c12b61b

Browse files
sc0wlukefromdc
authored andcommitted
caja-bookmark: Fix memory leak
'g_strconcat' needs to be freed
1 parent a8de3bb commit c12b61b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: libcaja-private/caja-bookmark.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ bookmark_image_menu_item_new_from_surface (cairo_surface_t *icon_surface,
605605
{
606606
GtkWidget *icon;
607607
GtkLabel *label;
608+
gchar *concat;
608609

609610
GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
610611

@@ -613,7 +614,9 @@ bookmark_image_menu_item_new_from_surface (cairo_surface_t *icon_surface,
613614
else
614615
icon = gtk_image_new ();
615616

616-
GtkWidget *label_menu = gtk_label_new (g_strconcat (label_name, " ", NULL));
617+
concat = g_strconcat (label_name, " ", NULL);
618+
GtkWidget *label_menu = gtk_label_new (concat);
619+
g_free (concat);
617620

618621
label = GTK_LABEL (label_menu);
619622
gtk_label_set_use_underline (label, FALSE);

0 commit comments

Comments
 (0)