diff options
author | Frederic Culot <calcurse@culot.org> | 2009-06-21 14:42:49 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2009-06-21 14:42:49 +0000 |
commit | bc44508a10434b18ca3d231d58882995a4d6d2ad (patch) | |
tree | 5336dd83dfc23233d2bd339bad56e6d76033bc3a | |
parent | 3ece481999768f494e2f4711b8e69e9f55491fe7 (diff) | |
download | calcurse-bc44508a10434b18ca3d231d58882995a4d6d2ad.tar.gz calcurse-bc44508a10434b18ca3d231d58882995a4d6d2ad.zip |
Free memory associated with structure used for appointments notification.
-rwxr-xr-x | ChangeLog | 7 | ||||
-rwxr-xr-x | src/notify.c | 12 | ||||
-rwxr-xr-x | src/notify.h | 3 | ||||
-rwxr-xr-x | src/utils.c | 4 |
4 files changed, 23 insertions, 3 deletions
@@ -1,3 +1,10 @@ +2009-06-21 Frederic Culot <frederic@culot.org> + + * src/notify.c (notify_free_app): new function + + * src/utils.c (exit_calcurse): free memory associated with + structure used for appointments notification + 2009-06-20 Frederic Culot <frederic@culot.org> * src/custom.c (set_confwin_attr): new function diff --git a/src/notify.c b/src/notify.c index 8eee0d5..32ea3e7 100755 --- a/src/notify.c +++ b/src/notify.c @@ -1,4 +1,4 @@ -/* $calcurse: notify.c,v 1.36 2009/01/22 18:11:57 culot Exp $ */ +/* $calcurse: notify.c,v 1.37 2009/06/21 14:42:49 culot Exp $ */ /* * Calcurse - text-based organizer @@ -112,6 +112,16 @@ notify_init_bar (void) extract_aptsfile (); } +/* + * Free memory associated with the notify_app structure. + */ +void +notify_free_app (void) +{ + if (notify_app.got_app && notify_app.txt) + mem_free (notify_app.txt); +} + /* Stop the notify-bar main thread. */ void notify_stop_main_thread (void) diff --git a/src/notify.h b/src/notify.h index 8823bb8..b2b8636 100755 --- a/src/notify.h +++ b/src/notify.h @@ -1,4 +1,4 @@ -/* $calcurse: notify.h,v 1.16 2009/01/02 22:28:54 culot Exp $ */ +/* $calcurse: notify.h,v 1.17 2009/06/21 14:42:49 culot Exp $ */ /* * Calcurse - text-based organizer @@ -55,6 +55,7 @@ struct notify_app_s int notify_bar (void); void notify_init_vars (void); void notify_init_bar (void); +void notify_free_app (void); void notify_start_main_thread (void); void notify_stop_main_thread (void); void notify_reinit_bar (void); diff --git a/src/utils.c b/src/utils.c index 6d83742..80101b9 100755 --- a/src/utils.c +++ b/src/utils.c @@ -1,4 +1,4 @@ -/* $calcurse: utils.c,v 1.68 2009/01/24 14:44:25 culot Exp $ */ +/* $calcurse: utils.c,v 1.69 2009/06/21 14:42:50 culot Exp $ */ /* * Calcurse - text-based organizer @@ -53,6 +53,7 @@ exit_calcurse (int status) { if (ui_mode == UI_CURSES) { + notify_stop_main_thread (); clear (); refresh (); endwin (); @@ -70,6 +71,7 @@ exit_calcurse (int status) recur_apoint_free_bkp (ERASE_FORCE); recur_event_free_bkp (ERASE_FORCE); todo_free_list (); + notify_free_app (); keys_free (); mem_stats (); exit (status); |