-rw-r--r-- | libkcal/icalformatimpl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index fe7413f..2405682 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -697,2 +697,3 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) } + icalattach_unref( attach ); break; @@ -702,3 +703,4 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) attach = icalattach_new_from_url(QFile::encodeName( alarm->audioFile() ).data()); - icalcomponent_add_property(a,icalproperty_new_attach(attach)); + icalcomponent_add_property(a,icalproperty_new_attach(attach)); + icalattach_unref( attach ); } @@ -721,3 +723,4 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) attach = icalattach_new_from_url(QFile::encodeName( *at ).data()); - icalcomponent_add_property(a,icalproperty_new_attach(attach)); + icalcomponent_add_property(a,icalproperty_new_attach(attach)); + icalattach_unref( attach ); } |