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

fixed segfault at gl_compose #431

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open

fixed segfault at gl_compose #431

wants to merge 2 commits into from

Conversation

asafalg
Copy link

@asafalg asafalg commented Jun 12, 2020

This fixes the issue #430 reported earlier.

@codecov
Copy link

codecov bot commented Jun 12, 2020

Codecov Report

Merging #431 into next will increase coverage by 0.11%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next     #431      +/-   ##
==========================================
+ Coverage   36.99%   37.10%   +0.11%     
==========================================
  Files          45       45              
  Lines        8572     8575       +3     
==========================================
+ Hits         3171     3182      +11     
+ Misses       5401     5393       -8     
Impacted Files Coverage Δ
src/backend/gl/gl_common.c 0.00% <0.00%> (ø)
src/log.h 56.25% <0.00%> (-25.00%) ⬇️
src/common.h 30.76% <0.00%> (-7.70%) ⬇️
src/win.c 64.43% <0.00%> (-0.21%) ⬇️
src/event.c 58.06% <0.00%> (+0.53%) ⬆️
src/region.h 20.00% <0.00%> (+8.88%) ⬆️
src/x.h 68.42% <0.00%> (+15.78%) ⬆️
src/utils.h 73.68% <0.00%> (+52.63%) ⬆️

@yshui
Copy link
Owner

yshui commented Aug 4, 2020

Seems like there could be a deeper underlying bug. I don't think gl_compose should be called with img == NULL

Copy link

@carmelopellegrino carmelopellegrino left a comment

Choose a reason for hiding this comment

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

If the function returns on line 530, it produces a memory leak of coord and indices. By just moving the whole if statement two lines above the memory leak is avoided.

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.

None yet

4 participants