Revert change and let user choose appropriate "image_destroy" function to prevent memory leaks.

Check return value from opj_copy_image_header.
This commit is contained in:
slmistry 2015-09-14 17:38:11 +01:00
parent 67dc887e53
commit 8af4ce4571
1 changed files with 3 additions and 3 deletions

View File

@ -102,9 +102,9 @@ OPJ_API opj_image_t* OPJ_CALLCONV opj_manager_image_create(opj_manager_t manager
void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
{
if (image) {
opj_manager_image_destroy(image->m_manager, image);
}
opj_manager_t l_manager = opj_manager_get_global_manager();
opj_manager_image_destroy(l_manager, image);
}
OPJ_API void OPJ_CALLCONV opj_manager_image_destroy(opj_manager_t manager, opj_image_t *image)