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

Memory leak in INI #1779

Closed
sssd-bot opened this issue May 2, 2020 · 0 comments
Closed

Memory leak in INI #1779

sssd-bot opened this issue May 2, 2020 · 0 comments

Comments

@sssd-bot
Copy link

sssd-bot commented May 2, 2020

Cloned from Pagure issue: https://pagure.io/SSSD/sssd/issue/737

  • Created at 2010-12-17 01:37:33 by dpal
  • Closed as Invalid
  • Assigned to nobody

Function

     static char **get_str_cfg_array(struct collection_item *item,
   46                                int include,
   47                                const char *sep,
   48                                int *size,
   49                                int *error)

will leak memory if the config string starts from spaces.
It looks like the optimization that I tried to implement has a flaw. I do not see a way to overcome this issue other than rewrite the function to copy data for each string in the array.

Comments


Comment from sgallagh at 2010-12-17 14:27:59

Fields changed

coverity: => 10043
keywords: => Coverity


Comment from sgallagh at 2010-12-17 14:27:59

Fields changed

coverity: => 10043
keywords: => Coverity


Comment from sgallagh at 2010-12-17 14:27:59

Fields changed

coverity: => 10043
keywords: => Coverity


Comment from dpal at 2010-12-21 01:37:13

I took a closer look at this one. I think I misread the code. I added a unit test for the case that I suspected might fail but it passed and I think after reading code again that it is correct.
Closing the issue.

resolution: => invalid
status: new => closed


Comment from dpal at 2010-12-21 01:37:13

I took a closer look at this one. I think I misread the code. I added a unit test for the case that I suspected might fail but it passed and I think after reading code again that it is correct.
Closing the issue.

resolution: => invalid
status: new => closed


Comment from dpal at 2010-12-21 01:37:13

I took a closer look at this one. I think I misread the code. I added a unit test for the case that I suspected might fail but it passed and I think after reading code again that it is correct.
Closing the issue.

resolution: => invalid
status: new => closed


Comment from dpal at 2012-01-19 03:26:16

Fields changed

rhbz: => 0


Comment from dpal at 2012-01-19 03:26:16

Fields changed

rhbz: => 0


Comment from dpal at 2012-01-19 03:26:16

Fields changed

rhbz: => 0


Comment from dpal at 2017-02-24 14:39:47

Metadata Update from @dpal:

  • Issue set to the milestone: Tools Backlog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant