aboutsummaryrefslogtreecommitdiffstats
path: root/src/note.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-10-13 08:20:35 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2016-10-13 19:51:43 +0200
commit9ef5fe2191c5d1d857bc4fe828c15268ba8caa90 (patch)
treea02c31a337f0b189ea0cab7141901ee455ccc3d9 /src/note.c
parentda6334cf385ff064a8296e8c0d0e080fa2014eaa (diff)
downloadcalcurse-9ef5fe2191c5d1d857bc4fe828c15268ba8caa90.tar.gz
calcurse-9ef5fe2191c5d1d857bc4fe828c15268ba8caa90.zip
Always use memory management wrappers
Use mem_*() wrappers instead of directly accessing libc functions when allocating/deallocating memory. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/note.c')
-rw-r--r--src/note.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/note.c b/src/note.c
index 4b274cd..0008a5f 100644
--- a/src/note.c
+++ b/src/note.c
@@ -201,7 +201,7 @@ void note_gc(void)
struct apoint *apt = LLIST_GET_DATA(i);
if (apt->note) {
tmph.hash = apt->note;
- free(HTABLE_REMOVE(htp, &gc_htable, &tmph));
+ mem_free(HTABLE_REMOVE(htp, &gc_htable, &tmph));
}
}
@@ -209,7 +209,7 @@ void note_gc(void)
struct event *ev = LLIST_GET_DATA(i);
if (ev->note) {
tmph.hash = ev->note;
- free(HTABLE_REMOVE(htp, &gc_htable, &tmph));
+ mem_free(HTABLE_REMOVE(htp, &gc_htable, &tmph));
}
}
@@ -217,7 +217,7 @@ void note_gc(void)
struct recur_apoint *rapt = LLIST_GET_DATA(i);
if (rapt->note) {
tmph.hash = rapt->note;
- free(HTABLE_REMOVE(htp, &gc_htable, &tmph));
+ mem_free(HTABLE_REMOVE(htp, &gc_htable, &tmph));
}
}
@@ -225,7 +225,7 @@ void note_gc(void)
struct recur_event *rev = LLIST_GET_DATA(i);
if (rev->note) {
tmph.hash = rev->note;
- free(HTABLE_REMOVE(htp, &gc_htable, &tmph));
+ mem_free(HTABLE_REMOVE(htp, &gc_htable, &tmph));
}
}
@@ -233,7 +233,7 @@ void note_gc(void)
struct todo *todo = LLIST_GET_DATA(i);
if (todo->note) {
tmph.hash = todo->note;
- free(HTABLE_REMOVE(htp, &gc_htable, &tmph));
+ mem_free(HTABLE_REMOVE(htp, &gc_htable, &tmph));
}
}