Commit 2f24913c authored by Matthias Clasen's avatar Matthias Clasen

fix another Coverity bug.

parent fb700e81
2006-04-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextbuffer.c (_gtk_text_buffer_remove_all_tags):
Avoid a NULL dereference. (Coverity)
2006-04-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentmanager.c: Make filename_warning() static,
......
2006-04-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextbuffer.c (_gtk_text_buffer_remove_all_tags):
Avoid a NULL dereference. (Coverity)
2006-04-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentmanager.c: Make filename_warning() static,
......
......@@ -2514,7 +2514,7 @@ gtk_text_buffer_remove_all_tags (GtkTextBuffer *buffer,
GtkTextIter first, second, tmp;
GSList *tags;
GSList *tmp_list;
GSList *prev;
GSList *prev, *next;
GtkTextTag *tag;
g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer));
......@@ -2569,14 +2569,15 @@ gtk_text_buffer_remove_all_tags (GtkTextBuffer *buffer,
if (tag == tmp_list->data)
{
/* duplicate */
next = tmp_list->next;
if (prev)
prev->next = tmp_list->next;
prev->next = next;
tmp_list->next = NULL;
g_slist_free (tmp_list);
tmp_list = prev->next;
tmp_list = next;
/* prev is unchanged */
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment