Commit 0e4ccb82 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

msi: Fix use of uninitialized variable (Coverity).

parent 7a845509
...@@ -4648,7 +4648,7 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param ) ...@@ -4648,7 +4648,7 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
LPWSTR deformatted, ptr; LPWSTR deformatted, ptr;
DWORD flags, type, size; DWORD flags, type, size;
LONG res; LONG res;
HKEY env, root = HKEY_CURRENT_USER; HKEY env = NULL, root = HKEY_CURRENT_USER;
static const WCHAR environment[] = static const WCHAR environment[] =
{'S','y','s','t','e','m','\\', {'S','y','s','t','e','m','\\',
...@@ -4759,7 +4759,7 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param ) ...@@ -4759,7 +4759,7 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
res = RegSetValueExW(env, name, 0, type, (LPVOID)newval, size); res = RegSetValueExW(env, name, 0, type, (LPVOID)newval, size);
done: done:
RegCloseKey(env); if (env) RegCloseKey(env);
msi_free(deformatted); msi_free(deformatted);
msi_free(data); msi_free(data);
msi_free(newval); msi_free(newval);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment