msi: Avoid accessing uninitialized memory.

Found by valgrind.
This commit is contained in:
Hans Leidekker 2009-10-21 13:20:04 +02:00 committed by Alexandre Julliard
parent ec0a0b372e
commit a15e6cbb1a

View File

@ -5037,7 +5037,7 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
goto done;
}
size = (lstrlenW(value) + 1 + size) * sizeof(WCHAR);
size += (lstrlenW(value) + 1) * sizeof(WCHAR);
newval = msi_alloc(size);
ptr = newval;
if (!newval)