GNOME clock location code can leak GError objects
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Redshift |
Fix Released
|
Medium
|
Unassigned |
Bug Description
The GConf lookup functions are passed a GError pointer on the stack. The GError pointer is used instead of the return value of the GConf function to check for errors. g_clear_error is never called on the GError pointers, so the objects are not released and the pointer value is not reset to NULL.
Every GError object produced is leaked, and in one case the pointer is reused without being reset in a loop, which results in incorrect behaviour.
The functions all return NULL on error in addition to setting the GError pointers. The GError pointer arguments are optional and Redshift never uses the actual information in the GError objects for printing error messages, so it is sufficient to remove them and test the actual return values.
The attached patch applies on top of the patch for #706353.
It also adds support for (Solaris/
Related branches
Changed in redshift: | |
importance: | Undecided → Medium |
Changed in redshift: | |
status: | New → Fix Committed |
Changed in redshift: | |
status: | Fix Committed → Fix Released |