diff --git a/imagick_class.c b/imagick_class.c index d45eb0dd..5c538857 100644 --- a/imagick_class.c +++ b/imagick_class.c @@ -14262,8 +14262,11 @@ PHP_METHOD(Imagick, getImageArtifacts) else { IM_add_assoc_string(return_value, artifacts[i], artifact_value); MagickRelinquishMemory(artifact_value); + DestroyString(artifact_value); } + DestroyString(artifacts[i]); } + RelinquishMagickMemory(artifacts); } /* }}} */ #endif