chiark / gitweb /
calendar: make freeing a calendar spec object deal fine with NULL
[elogind.git] / src / shared / calendarspec.c
index 69b7427..4ac74ab 100644 (file)
@@ -35,7 +35,9 @@ static void free_chain(CalendarComponent *c) {
 }
 
 void calendar_spec_free(CalendarSpec *c) {
-        assert(c);
+
+        if (!c)
+                return;
 
         free_chain(c->year);
         free_chain(c->month);