Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage cleanup #2652

Closed
wants to merge 9 commits into from
Closed

Conversation

homm
Copy link
Member

@homm homm commented Aug 5, 2017

This is a small cleanup before the further work on storage module.

  • Tests for different modes for Image.new
  • Fixed memory leak if no available memory for allocating new image
  • Fixed memory leak if xsize > (INT_MAX / 4) - 1
  • Use accurate im->linesize value instead of strlen(mode) approximation

Side effect: removed ImagingNewEpilogue

ImagingNewEpilogue now is always success
The Imaging object itself is freed through ImagingDelete in case
when memory is not allocated in ImagingNewBlock or ImagingNewArray
doublechecked: no im->image or im->image8 or im->image32 access
between ImagingNewPrologue and ImagingNewEpilogue anywhere
rename ImagingNewArray → ImagingAllocateArray
new utility function with old name ImagingNewBlock
call ImagingNewPrologue outside of ImagingAllocateBlock and ImagingAllocateArray
@homm
Copy link
Member Author

homm commented Aug 6, 2017

Closing in favor of #2654
Changed branch from uploadcare:storage-cleanup to python-pillow:storage-cleanup

@homm homm closed this Aug 6, 2017
@homm homm deleted the storage-cleanup branch August 6, 2017 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant