Skip to content

Fix dereferencing of potential null pointers#5111

Merged
radarhere merged 4 commits intopython-pillow:masterfrom
cgohlke:patch-3
Dec 27, 2020
Merged

Fix dereferencing of potential null pointers#5111
radarhere merged 4 commits intopython-pillow:masterfrom
cgohlke:patch-3

Conversation

@cgohlke
Copy link
Copy Markdown
Contributor

@cgohlke cgohlke commented Dec 19, 2020

No description provided.

if (h->histogram) {
free(h->histogram);
}
free(h);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this change is just to help in theory - but I'll still point out that in practice, with the other changes from this PR, ImagingHistogramDelete never receives a NULL argument.

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