Fixed a bug related to memory management (a free on a null pointer causes an abort now, which induces side effects on file import).
This commit is contained in:
parent
56a29600ad
commit
3fe8550373
@ -1,3 +1,8 @@
|
|||||||
|
2009-07-15 Frederic Culot <frederic@culot.org>
|
||||||
|
|
||||||
|
* src/io.c: could not import ical files anymore if notes were not
|
||||||
|
attached to items (thanks Chris for reporting it)
|
||||||
|
|
||||||
2009-07-12 Frederic Culot <frederic@culot.org>
|
2009-07-12 Frederic Culot <frederic@culot.org>
|
||||||
|
|
||||||
* configure.ac
|
* configure.ac
|
||||||
|
4
src/io.c
4
src/io.c
@ -1,4 +1,4 @@
|
|||||||
/* $calcurse: io.c,v 1.68 2009/07/12 17:48:13 culot Exp $ */
|
/* $calcurse: io.c,v 1.69 2009/07/15 18:48:44 culot Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calcurse - text-based organizer
|
* Calcurse - text-based organizer
|
||||||
@ -1666,6 +1666,7 @@ ical_store_todo (int priority, char *mesg, char *note)
|
|||||||
{
|
{
|
||||||
todo_add (mesg, priority, note);
|
todo_add (mesg, priority, note);
|
||||||
mem_free (mesg);
|
mem_free (mesg);
|
||||||
|
if (note)
|
||||||
mem_free (note);
|
mem_free (note);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1720,6 +1721,7 @@ ical_store_apoint (char *mesg, char *note, long start, long dur,
|
|||||||
apoint_new (mesg, note, start, dur, state);
|
apoint_new (mesg, note, start, dur, state);
|
||||||
}
|
}
|
||||||
mem_free (mesg);
|
mem_free (mesg);
|
||||||
|
if (note)
|
||||||
mem_free (note);
|
mem_free (note);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user