Skip to content

parse: plug a memory leak#348

Merged
slyon merged 2 commits intocanonical:mainfrom
daniloegea:fix_datalist_leak
Apr 24, 2023
Merged

parse: plug a memory leak#348
slyon merged 2 commits intocanonical:mainfrom
daniloegea:fix_datalist_leak

Conversation

@daniloegea
Copy link
Contributor

@daniloegea daniloegea commented Apr 21, 2023

The key doesn't need to be duplicated before being passed to g_datalist_set_data_full. It will not be freed.

Description

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

The key doesn't need to be duplicated before being passed to
g_datalist_set_data_full. It will not be freed.
Copy link
Contributor

@slyon slyon left a comment

Choose a reason for hiding this comment

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

lgtm! Just a small inline suggesting about using the GQuark API explicitly to make the code easier to understand.

@slyon slyon merged commit 479c039 into canonical:main Apr 24, 2023
daniloegea added a commit that referenced this pull request May 17, 2023
* parse: plug a memory leak

The key doesn't need to be duplicated before being passed to
g_datalist_set_data_full. It will not be freed.

* parse: Use GQuark + GData API explicitly, avoiding the macro abstraction
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