[glib/wip/nacho/registry-writable] registrybackend: close the key only if successfully opened



commit 87ed47fffcda47220c7484d0c1081f80bdb1fae5
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Tue Feb 2 09:15:10 2016 +0100

    registrybackend: close the key only if successfully opened

 gio/gregistrysettingsbackend.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gio/gregistrysettingsbackend.c b/gio/gregistrysettingsbackend.c
index 8c89f5c..a5eeb4b 100644
--- a/gio/gregistrysettingsbackend.c
+++ b/gio/gregistrysettingsbackend.c
@@ -1305,8 +1305,9 @@ registry_cache_update (GRegistryBackend *self,
                                  n_watches, changes);
           child_item = subkey_node->data;
           child_item->touched = TRUE;
+
+          RegCloseKey (hsubpath);
         }
-      RegCloseKey (hsubpath);
     }
 
   if (result != ERROR_NO_MORE_ITEMS)


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