[glib] registrybackend: close the key only if successfully opened



commit 5cc997f7c4d521bf824855c3a63b568186cbeb52
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 89de12a..cd54bff 100644
--- a/gio/gregistrysettingsbackend.c
+++ b/gio/gregistrysettingsbackend.c
@@ -1281,8 +1281,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]