gtkplacessidebar: avoid to use a freed string

Desktop / GNOME / GTK - Carlos Soriano [gnome.org] - 25 September 2015 09:10 UTC

The string we were using is the representation of the internal text in the popover entry. However that can be freed before setting the bookmark label, if i.e. the row is destroyed and therefore the popover as well. To avoid that, duplicate the label in a local variable.

One of the consequences is that for those people using development version we migth screwed its bookmarks file, since the bookmark manager wrote garbage from the already freed label.

https://bugzilla.gnome.org/show_bug.cgi?id=755215

ecc698a gtkplacessidebar: avoid to use a freed string
gtk/gtkplacessidebar.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Upstream: git.gnome.org


  • Share