From: Paul Durrant Date: Thu, 26 Nov 2015 16:17:14 +0000 (+0000) Subject: Make sure registry updates and deletes are flushed X-Git-Tag: 8.1.0-rc4^0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=02de8c37e69320db6b5db22c08c1a1fa9e5c6fac;p=pvdrivers%2Fwin%2Fxenbus.git Make sure registry updates and deletes are flushed In most cases it is desirable to makre sure any updates are committed to the registry hive on storage before any further operations are performed. This patch adds ZwFlushKey() calls to ensure that is the case. Signed-off-by: Paul Durrant --- diff --git a/src/common/registry.c b/src/common/registry.c index b75f16b..9e9f79a 100644 --- a/src/common/registry.c +++ b/src/common/registry.c @@ -372,6 +372,8 @@ RegistryDeleteSubKey( ZwClose(SubKey); + (VOID) ZwFlushKey(Key); + RtlFreeUnicodeString(&Unicode); return STATUS_SUCCESS; @@ -610,6 +612,8 @@ RegistryDeleteValue( RtlFreeUnicodeString(&Unicode); + (VOID) ZwFlushKey(Key); + return STATUS_SUCCESS; fail2: @@ -730,6 +734,8 @@ RegistryUpdateDwordValue( __RegistryFree(Partial); + (VOID) ZwFlushKey(Key); + RtlFreeUnicodeString(&Unicode); return STATUS_SUCCESS; @@ -1060,6 +1066,8 @@ RegistryUpdateBinaryValue( __RegistryFree(Partial); + (VOID) ZwFlushKey(Key); + RtlFreeUnicodeString(&Unicode); return STATUS_SUCCESS; @@ -1350,6 +1358,8 @@ RegistryUpdateSzValue( __RegistryFree(Partial); + (VOID) ZwFlushKey(Key); + RtlFreeUnicodeString(&Unicode); return STATUS_SUCCESS;