GNOME clock location code can leak GError objects

Bug #773854 reported by Albert Lee
6
This bug affects 1 person
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/OpenIndiana) JDS's /apps/panel/general/applet_id_list_jds, and fixes the line wrapping from the previous patch.

Revision history for this message
Albert Lee (trisk) wrote :
Revision history for this message
Albert Lee (trisk) wrote :
Changed in redshift:
importance: Undecided → Medium
Changed in redshift:
status: New → Fix Committed
Changed in redshift:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.