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 #2654

Merged
merged 9 commits into from
Aug 16, 2017
Merged

Storage cleanup #2654

merged 9 commits into from
Aug 16, 2017

Conversation

homm
Copy link
Member

@homm homm commented Aug 6, 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

@homm homm mentioned this pull request Aug 6, 2017
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 homm added this to the 4.3.0 milestone Aug 9, 2017
@wiredfool wiredfool merged commit e7aa155 into master Aug 16, 2017
@homm homm mentioned this pull request Aug 16, 2017
@homm homm deleted the storage-cleanup branch August 16, 2017 11:05
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.

2 participants