msi: Avoid a crash in STREAMS_delete.

This commit is contained in:
Hans Leidekker 2009-12-18 11:02:30 +01:00 committed by Alexandre Julliard
parent d9c52bfa70
commit 699cfc915a
1 changed files with 8 additions and 4 deletions

View File

@ -400,10 +400,14 @@ static UINT STREAMS_delete(struct tagMSIVIEW *view)
for (i = 0; i < sv->num_rows; i++) for (i = 0; i < sv->num_rows; i++)
{ {
if (sv->streams[i] && sv->streams[i]->stream) if (sv->streams[i])
IStream_Release(sv->streams[i]->stream); {
msi_free(sv->streams[i]->name); if (sv->streams[i]->stream)
msi_free(sv->streams[i]); IStream_Release(sv->streams[i]->stream);
msi_free(sv->streams[i]->name);
msi_free(sv->streams[i]);
}
} }
msi_free(sv->streams); msi_free(sv->streams);