From 52340fa0e132766e9a0d1e5a95d45282725cdf97 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sun, 10 Feb 2008 16:29:50 +0000 Subject: 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 --- src/notify.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/notify.c') 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(); -- cgit v1.2.3-54-g00ecf