summaryrefslogtreecommitdiff
path: root/examples/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/errors.c')
-rw-r--r--examples/errors.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/errors.c b/examples/errors.c
index f50c4c9d..25bccfdd 100644
--- a/examples/errors.c
+++ b/examples/errors.c
@@ -9,15 +9,13 @@ void program_errors()
icalerror_clear_errno();
- (void)icalcomponent_new(ICAL_VEVENT_COMPONENT);
+ icalcomponent *comp = icalcomponent_new(ICAL_VEVENT_COMPONENT);
if (icalerrno != ICAL_NO_ERROR){
-
fprintf(stderr,"Horrible libical error: %s\n",
icalerror_strerror(icalerrno));
-
}
-
+ icalcomponent_free(comp);
}
void component_errors(icalcomponent *comp)