Skip to content
Snippets Groups Projects
Commit a8b51497 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard
Browse files

msi: Avoid a leak when a query is executed more than once.

parent d5a98e5d
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,7 @@ typedef struct tagMSIWHEREVIEW
struct expr *cond;
UINT rec_index;
MSIORDERINFO *order_info;
UINT error;
} MSIWHEREVIEW;
#define INITIAL_REORDER_SIZE 16
......@@ -617,6 +618,9 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
if( !table )
return ERROR_FUNCTION_FAILED;
if (wv->reorder)
return wv->error;
r = init_reorder(wv);
if (r != ERROR_SUCCESS)
return r;
......@@ -648,7 +652,9 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
if (wv->order_info)
r = wv->order_info->error;
msi_free( rows );
wv->error = r;
return r;
}
......
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