Skip to content

Commit 5c197a1

Browse files
committed
PluginHEIF: fixed a memory leak
1 parent 9c128ed commit 5c197a1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Source/Plugins/PluginHEIF.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ class PluginHeif
497497
if (heifError.code != heif_error_Ok) {
498498
throw std::runtime_error(std::string("PluginHeif[Save]: Error in heif_context_encode_image(). ") + heifError.message);
499499
}
500+
yato_finally(([&, this]() { libHeif.heif_image_handle_release_f(heifPrimaryImageHandle); }));
500501

501502
// EXIF
502503
if (libHeif.heif_context_add_exif_metadata_f && heifPrimaryImageHandle) {

0 commit comments

Comments
 (0)