summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-rr-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmate-desktop/mate-rr-config.c')
-rw-r--r--libmate-desktop/mate-rr-config.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libmate-desktop/mate-rr-config.c b/libmate-desktop/mate-rr-config.c
index 2cd002c..1efa124 100644
--- a/libmate-desktop/mate-rr-config.c
+++ b/libmate-desktop/mate-rr-config.c
@@ -442,8 +442,8 @@ out:
MateRRConfig *
mate_rr_config_new_current (MateRRScreen *screen)
{
- MateRRConfig *config = g_new0 (MateRRConfig, 1);
- GPtrArray *a = g_ptr_array_new ();
+ MateRRConfig *config;
+ GPtrArray *a;
MateRROutput **rr_outputs;
int i;
int clone_width = -1;
@@ -452,6 +452,9 @@ mate_rr_config_new_current (MateRRScreen *screen)
g_return_val_if_fail (screen != NULL, NULL);
+ config = g_new0 (MateRRConfig, 1);
+ a = g_ptr_array_new ();
+
rr_outputs = mate_rr_screen_list_outputs (screen);
config->clone = FALSE;
@@ -1109,6 +1112,7 @@ mate_rr_config_save (MateRRConfig *configuration, GError **error)
g_free (backup_filename);
g_free (intended_filename);
+ g_string_free (output, TRUE);
return result;
}