[dconf] fix dconf-writer corruption issue (#595475)



commit ac5261f01d914de35503656c52e086207c54c2e9
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Sep 17 15:34:13 2009 -0400

    fix dconf-writer corruption issue (#595475)
    
    don't use zero-copy GVariant loads on data we're about to free...

 writer/dconf-writer.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/writer/dconf-writer.c b/writer/dconf-writer.c
index 3f02ebb..67f6289 100644
--- a/writer/dconf-writer.c
+++ b/writer/dconf-writer.c
@@ -261,7 +261,5 @@ dconf_writer_get_entry_value (DConfWriter                     *writer,
   index = dconf_writer_get_index (writer, &entry->data.index, TRUE);
   data = dconf_writer_get_chunk (writer, entry->data.index, &size);
 
-  return g_variant_ref_sink (g_variant_from_data (NULL,
-                                                  (gconstpointer) data, size,
-                                                  0, NULL, NULL));
+  return g_variant_load (NULL, (gconstpointer) data, size, 0);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]