diff options
author | Frederic Culot <calcurse@culot.org> | 2008-02-10 16:29:50 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2008-02-10 16:29:50 +0000 |
commit | 52340fa0e132766e9a0d1e5a95d45282725cdf97 (patch) | |
tree | a54b7b3410ba13453c87f0a1efeb7923839c740d /src/notify.c | |
parent | 886466310798ee9d63191cff05d57c4e9528b32e (diff) | |
download | calcurse-52340fa0e132766e9a0d1e5a95d45282725cdf97.zip |
memory leak fixed in notify_thread_app()
check for limits.h header added
asprintf() call replaced in wins_launch_external() as it is not
fully portable
Diffstat (limited to 'src/notify.c')
-rwxr-xr-x | src/notify.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/notify.c b/src/notify.c index 3531a02..0befe8b 100755 --- a/src/notify.c +++ b/src/notify.c @@ -1,4 +1,4 @@ -/* $calcurse: notify.c,v 1.23 2007/12/30 16:27:59 culot Exp $ */ +/* $calcurse: notify.c,v 1.24 2008/02/10 16:29:50 culot Exp $ */ /* * Calcurse - text-based organizer @@ -278,6 +278,7 @@ notify_thread_app(void *arg) tmp_app = (struct notify_app_s *) malloc(sizeof(struct notify_app_s)); tmp_app->time = current_time + DAYINSEC; tmp_app->got_app = 0; + tmp_app->txt = NULL; tmp_app = recur_apoint_check_next(tmp_app, current_time, get_today()); tmp_app = apoint_check_next(tmp_app, current_time); @@ -292,6 +293,8 @@ notify_thread_app(void *arg) } pthread_mutex_unlock(¬ify_app->mutex); + if (tmp_app->txt != NULL) + free(tmp_app->txt); free(tmp_app); notify_update_bar(); |