Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In case "auto_save" is not set in the config file, the error pointer will point to a GError that is printed by the g_info() but the pointer is not freed after using. This causes not only memory leak but also a warning from Glib in case you also do not have "custom_color" in your config as g_key_file_get_string() will get a pointer that already points to GError. The warning message looks like this: (swappy:492252): GLib-WARNING **: 20:11:27.212: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: Key file does not have key “custom_color” in group “Default” A solution is to properly free the error pointer after it is no longer needed and before it is reused. --------- Co-authored-by: Krzysztof Adamski <[email protected]>
- Loading branch information