Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not free cf_image_t data structure in _cfImageZoomDelete()
The library-internal _cfImageZoom...() API handles zooming of images with a data structure of type cf_izoom_t. This data structure contains a pointer to the original image, in cf_image_t format. The _cfImageZoomNew() funtion gets a pointer to an existing cf_image_t structure as parameter, the image to work on. It stores the pointer in its cf_izoom_t structure. It never creates a cf_image_t image. Because the _cfImageZoom...() API never creates a cf_image_t structure, it should also never free it. Therefore it is wrong that _cfImageZoomDelete() calls cfImageClose() which is the function to free a cf_image_t structure after use. This was leading to double freeing, as the functions which create a cf_image_t structure always free it when done. This caused OpenPrinting/cups-filters#507
- Loading branch information