Commit fbad9b49 authored by Maik Qualmann's avatar Maik Qualmann

release HeifContext at the end of loading

BUGS: 421559
FIXED-IN: 7.0.0
parent 4cf22971
......@@ -738,4 +738,5 @@ BUGFIXES:
702 ==> 421387 - Camera Leica V-Lux (Typ 114) not supported.
703 ==> 421023 - Face tagging quirky in digiKam 7.0.0-beta3.
704 ==> 421560 - Undo not working in ImageEditor RC.
705 ==>
705 ==> 421559 - HEIC: Failed to open the data source: Too many open files (errno = 24).
706 ==>
......@@ -321,6 +321,8 @@ bool DImgHEIFLoader::readHEICImageByID(struct heif_context* const heif_context,
if (!isHeifSuccess(&error))
{
heif_context_free(heif_context);
return false;
}
......@@ -354,6 +356,7 @@ bool DImgHEIFLoader::readHEICImageByID(struct heif_context* const heif_context,
if (!isHeifSuccess(&error))
{
heif_image_handle_release(image_handle);
heif_context_free(heif_context);
return false;
}
......@@ -361,16 +364,23 @@ bool DImgHEIFLoader::readHEICImageByID(struct heif_context* const heif_context,
heif_image_handle_release(image_handle);
qDebug() << "HEIF preview found in thumbnail chunk";
return readHEICImageByHandle(thumbnail_handle, heif_image);
bool ret = readHEICImageByHandle(thumbnail_handle, heif_image);
heif_context_free(heif_context);
return ret;
}
}
if (m_loadFlags & LoadImageData)
{
return readHEICImageByHandle(image_handle, heif_image);
bool ret = readHEICImageByHandle(image_handle, heif_image);
heif_context_free(heif_context);
return ret;
}
heif_image_handle_release(image_handle);
heif_context_free(heif_context);
return true;
}
......@@ -431,6 +441,7 @@ bool DImgHEIFLoader::readHEICImageByHandle(struct heif_image_handle* image_handl
{
heif_image_release(heif_image);
heif_image_handle_release(image_handle);
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment