msi: Avoid dereferencing a NULL pointer (clang).

This commit is contained in:
Hans Leidekker 2011-07-07 09:22:59 +02:00 committed by Alexandre Julliard
parent 6083fd5e53
commit 540d189060

View file

@ -247,8 +247,11 @@ static WCHAR *get_assembly_display_name( MSIDATABASE *db, const WCHAR *comp, MSI
done:
msiobj_release( &view->hdr );
for (i = 0; i < name.count; i++) msi_free( name.attrs[i] );
msi_free( name.attrs );
if (name.attrs)
{
for (i = 0; i < name.count; i++) msi_free( name.attrs[i] );
msi_free( name.attrs );
}
return display_name;
}