aboutsummaryrefslogtreecommitdiffstats
path: root/src/notify.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2008-02-10 16:29:50 +0000
committerFrederic Culot <calcurse@culot.org>2008-02-10 16:29:50 +0000
commit52340fa0e132766e9a0d1e5a95d45282725cdf97 (patch)
treea54b7b3410ba13453c87f0a1efeb7923839c740d /src/notify.c
parent886466310798ee9d63191cff05d57c4e9528b32e (diff)
downloadcalcurse-52340fa0e132766e9a0d1e5a95d45282725cdf97.tar.gz
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-xsrc/notify.c5
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(&notify_app->mutex);
+ if (tmp_app->txt != NULL)
+ free(tmp_app->txt);
free(tmp_app);
notify_update_bar();