Skip to content
Snippets Groups Projects
Commit fb3f40b9 authored by Michael McCormack's avatar Michael McCormack Committed by Alexandre Julliard
Browse files

Fix crash that occurred when an invalid query string was deleted

twice.
parent f558741f
No related branches found
No related tags found
No related merge requests found
......@@ -767,6 +767,7 @@ UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview )
{
if( *sql.view )
(*sql.view)->ops->delete( *sql.view );
*sql.view = NULL;
return ERROR_BAD_QUERY_SYNTAX;
}
......
......@@ -295,7 +295,8 @@ static UINT WHERE_delete( struct tagMSIVIEW *view )
wv->reorder = NULL;
wv->row_count = 0;
delete_expr( wv->cond );
if( wv->cond )
delete_expr( wv->cond );
HeapFree( GetProcessHeap(), 0, wv );
......@@ -340,6 +341,7 @@ UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table )
wv->table = table;
wv->row_count = 0;
wv->reorder = NULL;
wv->cond = NULL;
*view = (MSIVIEW*) wv;
return ERROR_SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment