Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
caja-bookmark: Fix memory leak
'g_strconcat' needs to be freed
  • Loading branch information
sc0w authored and lukefromdc committed Dec 1, 2018
1 parent a8de3bb commit c12b61b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libcaja-private/caja-bookmark.c
Expand Up @@ -605,6 +605,7 @@ bookmark_image_menu_item_new_from_surface (cairo_surface_t *icon_surface,
{
GtkWidget *icon;
GtkLabel *label;
gchar *concat;

GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);

Expand All @@ -613,7 +614,9 @@ bookmark_image_menu_item_new_from_surface (cairo_surface_t *icon_surface,
else
icon = gtk_image_new ();

GtkWidget *label_menu = gtk_label_new (g_strconcat (label_name, " ", NULL));
concat = g_strconcat (label_name, " ", NULL);
GtkWidget *label_menu = gtk_label_new (concat);
g_free (concat);

label = GTK_LABEL (label_menu);
gtk_label_set_use_underline (label, FALSE);
Expand Down

0 comments on commit c12b61b

Please sign in to comment.