Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
minichma committed Sep 29, 2024
1 parent 1ff4e92 commit 31d9f5f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/libical/icalrecur.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,15 +704,9 @@ static void icalrecurrencetype_free(struct icalrecurrencetype *recur)
#define SAFEFREE(p) if (p) { icalmemory_free_buffer(p); p = 0; }

SAFEFREE(recur->rscale);
SAFEFREE(recur->by[ICAL_BY_SECOND].data);
SAFEFREE(recur->by[ICAL_BY_MINUTE].data);
SAFEFREE(recur->by[ICAL_BY_HOUR].data);
SAFEFREE(recur->by[ICAL_BY_DAY].data);
SAFEFREE(recur->by[ICAL_BY_MONTH_DAY].data);
SAFEFREE(recur->by[ICAL_BY_YEAR_DAY].data);
SAFEFREE(recur->by[ICAL_BY_WEEK_NO].data);
SAFEFREE(recur->by[ICAL_BY_MONTH].data);
SAFEFREE(recur->by[ICAL_BY_SET_POS].data);
for (int i = 0; i < ICAL_BY_NUM_PARTS; i++) {
SAFEFREE(recur->by[i].data);
}

#undef SAFEFREE

Expand Down

0 comments on commit 31d9f5f

Please sign in to comment.