From: Paul Durrant Date: Thu, 13 Mar 2014 17:45:38 +0000 (+0100) Subject: Fix a double-free and add more logging in the co-installer X-Git-Tag: 8.1.0-rc1~40^2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e3cbc23c7225cc28e3919b4a55828d1379c9418e;p=pvdrivers%2Fwin%2Fxennet.git Fix a double-free and add more logging in the co-installer Signed-off-by: Paul Durrant --- diff --git a/src/coinst/coinst.c b/src/coinst/coinst.c index b1c1b2f..3f6b641 100644 --- a/src/coinst/coinst.c +++ b/src/coinst/coinst.c @@ -2077,6 +2077,8 @@ CopyKeyValues( LPBYTE Value; DWORD Index; + Log("====>"); + Error = RegQueryInfoKey(SourceKey, NULL, NULL, @@ -2094,6 +2096,8 @@ CopyKeyValues( goto fail1; } + Log("%d VALUES", Values); + if (Values == 0) goto done; @@ -2148,10 +2152,9 @@ CopyKeyValues( free(Value); free(Name); - RegCloseKey(SourceKey); - RegCloseKey(DestinationKey); - done: + Log("<===="); + return TRUE; fail5: @@ -2197,6 +2200,7 @@ CopyValues( HKEY DestinationKey; HKEY SourceKey; + Log("====>"); Log("DESTINATION: %s", DestinationKeyName); Log("SOURCE: %s", SourceKeyName); @@ -2230,6 +2234,8 @@ CopyValues( RegCloseKey(SourceKey); RegCloseKey(DestinationKey); + Log("<===="); + return TRUE; fail2: @@ -2265,6 +2271,8 @@ CopyParameters( HRESULT Error; BOOLEAN Success; + Log("====>"); + Length = (DWORD)((strlen(Prefix) + strlen(DestinationName) + 1) * sizeof (TCHAR)); @@ -2306,6 +2314,8 @@ CopyParameters( free(SourceKeyName); free(DestinationKeyName); + Log("<===="); + return Success; fail4: @@ -3295,7 +3305,7 @@ DecrementServiceCount( RegCloseKey(ServiceKey); - Log("<==== "); + Log("<===="); return TRUE;