Skip to content

config: refactor freeing config list after getting entry#7235

Open
kcsaul wants to merge 1 commit into
libgit2:mainfrom
kcsaul:fix/config-memory-backend-followup
Open

config: refactor freeing config list after getting entry#7235
kcsaul wants to merge 1 commit into
libgit2:mainfrom
kcsaul:fix/config-memory-backend-followup

Conversation

@kcsaul
Copy link
Copy Markdown
Contributor

@kcsaul kcsaul commented Apr 30, 2026

Follow-up to #7232, this is intended to provide a more holistic fix, with config backends being refactored to support git_config_list_get and git_config_list_get_unique calling git_config_list_incref before returning an entry, rather than it needing to be handled externally.

However, this still relies on assumption backends using git_config_list will create entries using git_config_list_entry_free for clean-up before appending to the list.

@kcsaul kcsaul marked this pull request as draft April 30, 2026 10:23
@kcsaul kcsaul force-pushed the fix/config-memory-backend-followup branch from a2bcb0e to e868e27 Compare April 30, 2026 11:03
@kcsaul kcsaul force-pushed the fix/config-memory-backend-followup branch from e868e27 to 0043156 Compare April 30, 2026 11:10
@kcsaul kcsaul marked this pull request as ready for review April 30, 2026 11:30
@kcsaul
Copy link
Copy Markdown
Contributor Author

kcsaul commented Apr 30, 2026

@ethomson - Here's the follow-up, still feels a little messy to me, but possibly a step in the right direction to improve the boundary between backend implementations and config list being reused, and hopefully in keeping with a more holistic solution you were after.

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.

1 participant