msi: Fix a memory leak (valgrind).

This commit is contained in:
Hans Leidekker 2011-03-10 12:45:41 +01:00 committed by Alexandre Julliard
parent 92405a2d98
commit 2df374ac35
1 changed files with 1 additions and 2 deletions

View File

@ -997,7 +997,6 @@ static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
UINT ret = ERROR_SUCCESS; UINT ret = ERROR_SUCCESS;
component = MSI_RecordGetString(row, 2); component = MSI_RecordGetString(row, 2);
filename = strdupW( MSI_RecordGetString(row, 3) );
dirprop = MSI_RecordGetString(row, 4); dirprop = MSI_RecordGetString(row, 4);
install_mode = MSI_RecordGetInteger(row, 5); install_mode = MSI_RecordGetInteger(row, 5);
@ -1026,7 +1025,7 @@ static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
return ERROR_OUTOFMEMORY; return ERROR_OUTOFMEMORY;
size = 0; size = 0;
if (filename) if ((filename = strdupW( MSI_RecordGetString(row, 3) )))
{ {
reduce_to_longfilename( filename ); reduce_to_longfilename( filename );
size = lstrlenW( filename ); size = lstrlenW( filename );