Commit e821f9d7 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Add missing calls to MsiViewClose.

parent 293bdffa
...@@ -1070,8 +1070,8 @@ static MSIHANDLE get_column_info(MSIHANDLE hdb, const char *query, MSICOLINFO ty ...@@ -1070,8 +1070,8 @@ static MSIHANDLE get_column_info(MSIHANDLE hdb, const char *query, MSICOLINFO ty
if( r == ERROR_SUCCESS ) if( r == ERROR_SUCCESS )
{ {
MsiViewGetColumnInfo( hview, type, &rec ); MsiViewGetColumnInfo( hview, type, &rec );
MsiViewClose(hview);
} }
MsiViewClose(hview);
MsiCloseHandle(hview); MsiCloseHandle(hview);
return rec; return rec;
} }
...@@ -1101,9 +1101,8 @@ static UINT get_columns_table_type(MSIHANDLE hdb, const char *table, UINT field) ...@@ -1101,9 +1101,8 @@ static UINT get_columns_table_type(MSIHANDLE hdb, const char *table, UINT field)
type = MsiRecordGetInteger( rec, 4 ); type = MsiRecordGetInteger( rec, 4 );
MsiCloseHandle( rec ); MsiCloseHandle( rec );
} }
MsiViewClose(hview);
} }
MsiViewClose(hview);
MsiCloseHandle(hview); MsiCloseHandle(hview);
return type; return type;
} }
...@@ -1325,6 +1324,7 @@ static void test_longstrings(void) ...@@ -1325,6 +1324,7 @@ static void test_longstrings(void)
r = MsiViewFetch(hview, &hrec); r = MsiViewFetch(hview, &hrec);
ok(r == ERROR_SUCCESS, "MsiViewFetch failed\n"); ok(r == ERROR_SUCCESS, "MsiViewFetch failed\n");
MsiViewClose(hview);
MsiCloseHandle(hview); MsiCloseHandle(hview);
r = MsiRecordGetString(hrec, 2, NULL, &len); r = MsiRecordGetString(hrec, 2, NULL, &len);
...@@ -1425,6 +1425,7 @@ static void test_streamtable(void) ...@@ -1425,6 +1425,7 @@ static void test_streamtable(void)
ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r);
MsiCloseHandle( rec ); MsiCloseHandle( rec );
MsiViewClose( view );
MsiCloseHandle( view ); MsiCloseHandle( view );
r = MsiDatabaseOpenView( hdb, r = MsiDatabaseOpenView( hdb,
...@@ -1453,6 +1454,7 @@ static void test_streamtable(void) ...@@ -1453,6 +1454,7 @@ static void test_streamtable(void)
r = MsiViewFetch( view, &rec ); r = MsiViewFetch( view, &rec );
ok( r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok( r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
MsiViewClose( view );
MsiCloseHandle( view ); MsiCloseHandle( view );
MsiCloseHandle( hdb ); MsiCloseHandle( hdb );
DeleteFile(msifile); DeleteFile(msifile);
...@@ -1714,6 +1716,7 @@ static void test_msiimport(void) ...@@ -1714,6 +1716,7 @@ static void test_msiimport(void)
ok(i == -2147483640, "Expected -2147483640, got %d\n", i); ok(i == -2147483640, "Expected -2147483640, got %d\n", i);
MsiCloseHandle(rec); MsiCloseHandle(rec);
MsiViewClose(view);
MsiCloseHandle(view); MsiCloseHandle(view);
query = "SELECT * FROM `TwoPrimary`"; query = "SELECT * FROM `TwoPrimary`";
...@@ -2042,6 +2045,7 @@ static void test_handle_limit(void) ...@@ -2042,6 +2045,7 @@ static void test_handle_limit(void)
for (i=0; i<MY_NVIEWS; i++) { for (i=0; i<MY_NVIEWS; i++) {
if (hviews[i] != 0 && hviews[i] != 0xdeadbeeb) { if (hviews[i] != 0 && hviews[i] != 0xdeadbeeb) {
MsiViewClose(hviews[i]);
r = MsiCloseHandle(hviews[i]); r = MsiCloseHandle(hviews[i]);
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS)
break; break;
...@@ -2529,6 +2533,7 @@ static void test_try_transform(void) ...@@ -2529,6 +2533,7 @@ static void test_try_transform(void)
ok(r == ERROR_NO_MORE_ITEMS, "view fetch succeeded\n"); ok(r == ERROR_NO_MORE_ITEMS, "view fetch succeeded\n");
MsiCloseHandle(hrec); MsiCloseHandle(hrec);
MsiViewClose(hview);
MsiCloseHandle(hview); MsiCloseHandle(hview);
/* check that the property was added */ /* check that the property was added */
...@@ -3317,6 +3322,7 @@ static void test_temporary_table(void) ...@@ -3317,6 +3322,7 @@ static void test_temporary_table(void)
ok( 0 == strcmp("j2", buf), "wrong column type\n"); ok( 0 == strcmp("j2", buf), "wrong column type\n");
MsiCloseHandle( rec ); MsiCloseHandle( rec );
MsiViewClose( view );
MsiCloseHandle( view ); MsiCloseHandle( view );
/* query the table data */ /* query the table data */
...@@ -5295,6 +5301,7 @@ static void test_quotes(void) ...@@ -5295,6 +5301,7 @@ static void test_quotes(void)
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
} }
MsiViewClose(hview);
MsiCloseHandle(hview); MsiCloseHandle(hview);
write_file("import.idt", import_dat, (sizeof(import_dat) - 1) * sizeof(char)); write_file("import.idt", import_dat, (sizeof(import_dat) - 1) * sizeof(char));
...@@ -5325,8 +5332,8 @@ static void test_quotes(void) ...@@ -5325,8 +5332,8 @@ static void test_quotes(void)
r = MsiViewFetch(hview, &hrec); r = MsiViewFetch(hview, &hrec);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
MsiViewClose(hview);
MsiCloseHandle(hview); MsiCloseHandle(hview);
MsiCloseHandle(hdb); MsiCloseHandle(hdb);
DeleteFileA(msifile); DeleteFileA(msifile);
} }
...@@ -5731,8 +5738,6 @@ static void test_noquotes(void) ...@@ -5731,8 +5738,6 @@ static void test_noquotes(void)
MsiViewClose(hview); MsiViewClose(hview);
MsiCloseHandle(hview); MsiCloseHandle(hview);
MsiCloseHandle(hdb); MsiCloseHandle(hdb);
DeleteFileA(msifile); DeleteFileA(msifile);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment