diff options
Diffstat (limited to 'examples/errors.c')
-rw-r--r-- | examples/errors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/errors.c b/examples/errors.c index 315d3702..5328cfd5 100644 --- a/examples/errors.c +++ b/examples/errors.c @@ -13,13 +13,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) |