diff options
author | Frederic Culot <calcurse@culot.org> | 2009-07-27 19:35:09 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2009-07-27 19:35:09 +0000 |
commit | b45a8bfbb454160e8e4a2f4925a0c1ad27ef92c2 (patch) | |
tree | 1080969d4c05454a6cb13c1c2d3b82d0c6ed3bd4 /src/utils.c | |
parent | f0005f64dc522a3cd2fd1f8083f70047b17d015a (diff) | |
download | calcurse-b45a8bfbb454160e8e4a2f4925a0c1ad27ef92c2.zip |
Work on allocating and freeing memory associated with user's data for the daemon.
Diffstat (limited to 'src/utils.c')
-rwxr-xr-x | src/utils.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/utils.c b/src/utils.c index b4e7a93..37eab66 100755 --- a/src/utils.c +++ b/src/utils.c @@ -1,4 +1,4 @@ -/* $calcurse: utils.c,v 1.80 2009/07/26 20:26:16 culot Exp $ */ +/* $calcurse: utils.c,v 1.81 2009/07/27 19:35:09 culot Exp $ */ /* * Calcurse - text-based organizer @@ -80,17 +80,7 @@ exit_calcurse (int status) calendar_stop_date_thread (); io_stop_psave_thread (); - day_free_list (); - event_llist_free (); - event_free_bkp (ERASE_FORCE); - apoint_llist_free (); - apoint_free_bkp (ERASE_FORCE); - recur_apoint_llist_free (); - recur_event_llist_free (); - recur_apoint_free_bkp (ERASE_FORCE); - recur_event_free_bkp (ERASE_FORCE); - todo_free_list (); - notify_free_app (); + free_user_data (); keys_free (); mem_stats (); if (was_interactive) @@ -104,6 +94,22 @@ exit_calcurse (int status) exit (status); } +void +free_user_data (void) +{ + day_free_list (); + event_llist_free (); + event_free_bkp (ERASE_FORCE); + apoint_llist_free (); + apoint_free_bkp (ERASE_FORCE); + recur_apoint_llist_free (); + recur_event_llist_free (); + recur_apoint_free_bkp (ERASE_FORCE); + recur_event_free_bkp (ERASE_FORCE); + todo_free_list (); + notify_free_app (); +} + /* Function to exit on internal error. */ void fatalbox (const char *errmsg) |