plugin_set_key_group() and _full() effectively take the ownership, because the section_name is stored inside Geany.
Plugins usually pass a static string so it's not a problem. But GI-based plugins might pass dynamic strings, so this behavior needs to be documented.
Fixes keybindings.conf being written with garbage (for a GI-based plugin). You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1125
-- Commit Summary --
* api: correctly document ownership transfer
-- File Changes --
M src/pluginutils.c (4)
-- Patch Links --
https://github.com/geany/geany/pull/1125.patch https://github.com/geany/geany/pull/1125.diff
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/1125
@b4n please merge for 1.28
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/1125#issuecomment-231101793
IMO it's better to fix the actual issue so we can also free the string properly, instead of working around the issue in GI.
Opened #1126 for this, should be trivial.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/1125#issuecomment-231125499
Closed #1125 via #1126.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/1125#event-717592243
github-comments@lists.geany.org