From aa7d6c5eb75d236a6a58b4df8c98335fd0ac24dd Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Fri, 2 Jan 2009 19:52:32 +0000 Subject: various bugfixes --- src/todo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/todo.c') diff --git a/src/todo.c b/src/todo.c index 68601f6..34bc8f2 100755 --- a/src/todo.c +++ b/src/todo.c @@ -1,4 +1,4 @@ -/* $calcurse: todo.c,v 1.29 2008/12/28 13:13:59 culot Exp $ */ +/* $calcurse: todo.c,v 1.30 2009/01/02 19:52:32 culot Exp $ */ /* * Calcurse - text-based organizer @@ -492,14 +492,14 @@ todo_free_list (void) struct todo_s *o, **i; i = &todolist; - for (o = todolist; o != 0; o = o->next) + while (*i) { + o = *i; *i = o->next; mem_free (o->mesg); if (o->note != 0) erase_note (&o->note, ERASE_FORCE_KEEP_NOTE); mem_free (o); - i = &(*i)->next; } if (todolist) mem_free (todolist); -- cgit v1.2.3-54-g00ecf