Re: [gmime-devel] g_mime_header_list_clear leaving a list in limbo
- From: Ludo Brands <ludo brands free fr>
- To: stedfast comcast net
- Cc: gmime-devel-list gnome org
- Subject: Re: [gmime-devel] g_mime_header_list_clear leaving a list in limbo
- Date: Mon, 26 Nov 2012 13:13:25 +0100
Hi Jeff,
(I'd normally use inline comments, but my computer died on me the
second time in 6 months, so I'm having to use a lame webmail interface
to reply to email)
Ouch
The problem with the g_mime_header_list_clear() is that it isn't
removing the linked-list nodes as it frees them. Oops. There should be
a list_unlink() call on each header before it is free'd. Another
option is that it should call list_init() after freeing all the nodes.
OK
I'm not sure what is going wrong with g_mime_header_iter_remove() and
because of my dead linux box, I can't easily run it in a debugger at
the moment. I'll try to look into it as soon as I figure out why my
machine won't boot and install a replacement component.
In list.c is a list_unlink_tail() that updates list->tailpred; but it
that is never used. Similar for list_unlink_head. Perhaps a simple test
for tail or head in list_unlink() would be a solution.
Good catch on the g_mime_header_list_prepend() using list_append().
I'll commit a fix for this as soon as I send out this email.
Jeff
Ok, thanks
Ludo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]