aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/cal-util')
-rw-r--r--calendar/cal-util/calobj.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c
index 8272fd1560..89bfc94540 100644
--- a/calendar/cal-util/calobj.c
+++ b/calendar/cal-util/calobj.c
@@ -408,8 +408,10 @@ ical_object_create_from_vobject (VObject *o, const char *object_name)
ical->type = ICAL_EVENT;
else if (strcmp (object_name, VCTodoProp) == 0)
ical->type = ICAL_TODO;
- else
+ else {
+ g_free (ical);
return 0;
+ }
/* uid */
if (has (o, VCUniqueStringProp)){