diff --git a/imagickkernel_class.c b/imagickkernel_class.c index ba462358..eee111ac 100644 --- a/imagickkernel_class.c +++ b/imagickkernel_class.c @@ -395,6 +395,9 @@ PHP_METHOD(ImagickKernel, fromMatrix) kernel_info = imagick_createKernel(values, num_columns, num_rows, origin_x, origin_y); createKernelZval(return_value, kernel_info TSRMLS_CC); +// The values are still used here, as free'ing them causes problems + return; + cleanup: if (values != NULL) { RelinquishAlignedMemory(values); @@ -758,7 +761,9 @@ PHP_METHOD(ImagickKernel, separate) kernel_info->x, kernel_info->y ); - RelinquishAlignedMemory(values_copy); + +// The values are still used here, as free'ing them causes problems +// RelinquishAlignedMemory(values_copy); #if PHP_VERSION_ID >= 70000 createKernelZval(&separate_object, kernel_info_copy TSRMLS_CC);