pidgin: ecbb67fb: Nullify the freed pointer so it's not ac...
sadrul at pidgin.im
sadrul at pidgin.im
Thu Oct 8 20:07:45 EDT 2009
-----------------------------------------------------------------
Revision: ecbb67fb8ee3a827f7d9732a5236fed62fd75daa
Ancestor: 68015dbcfc3b6e827d4a8a4eebc1632d932f2c63
Author: sadrul at pidgin.im
Date: 2009-10-08T18:03:05
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ecbb67fb8ee3a827f7d9732a5236fed62fd75daa
Modified files:
finch/libgnt/gnttextview.c
ChangeLog:
Nullify the freed pointer so it's not accessed later.
-------------- next part --------------
============================================================
--- finch/libgnt/gnttextview.c 5a4bdab60e978137fe1d2822ba4574e0f4fe9a48
+++ finch/libgnt/gnttextview.c f89e1690097873356a26699a17dc12496dbc69b0
@@ -767,6 +767,7 @@ int gnt_text_view_tag_change(GntTextView
line->segments = g_list_delete_link(line->segments, segs);
if (line->segments == NULL) {
free_text_line(line, NULL);
+ line = NULL;
if (view->list == iter) {
if (inext)
view->list = inext;
@@ -780,7 +781,8 @@ int gnt_text_view_tag_change(GntTextView
seg->start = tag->start;
seg->end = tag->end - change;
}
- line->length -= change;
+ if (line)
+ line->length -= change;
/* XXX: Make things work if the tagged text spans over several lines. */
} else {
/* XXX: handle the rest of the conditions */
More information about the Commits
mailing list