Page MenuHomePhabricator

efl_ui_text: Fix resource leak
ClosedPublic

Authored by devilhorns on Mar 12 2019, 7:44 AM.

Details

Summary

Coverity reports a resource leak here. When we return due to invalid
selection, we should free the 'ldata' that we previously allocated

Fixes Coverity CID1396998

@fix

Diff Detail

Repository
rEFL core/efl
Branch
devs/devilhorns/coverity
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 10330
devilhorns created this revision.Mar 12 2019, 7:44 AM
devilhorns requested review of this revision.Mar 12 2019, 7:44 AM
devilhorns updated this revision to Diff 20524.Mar 13 2019, 7:57 AM
devilhorns edited the summary of this revision. (Show Details)

rebase

ldata is not needed until the end of the function pretty much. I think that moving its allocation to later in the function would actually solve the issue here.

cedric requested changes to this revision.Mar 13 2019, 4:15 PM
This revision now requires changes to proceed.Mar 13 2019, 4:15 PM
devilhorns updated this revision to Diff 20551.Mar 14 2019, 4:20 AM

Move ldata allocation to end of function where it is needed, based on

review comments

devilhorns edited the summary of this revision. (Show Details)
devilhorns added a reviewer: stefan_schmidt.

no changes

devilhorns updated this revision to Diff 20621.Mar 15 2019, 6:02 AM

no changes

cedric accepted this revision.Mar 15 2019, 9:00 AM
This revision is now accepted and ready to land.Mar 15 2019, 9:00 AM
devilhorns closed this revision.Mar 15 2019, 9:13 AM