Commit b597f999 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed memory leak introduced in previous change.

parent c6b005ac
......@@ -156,6 +156,7 @@ UINT MSI_OpenQuery( MSIDATABASE *db, MSIQUERY **view, LPCWSTR fmt, ... )
if (res == -1) size *= 2;
else if (res >= size) size = res + 1;
else break;
HeapFree( GetProcessHeap(), 0, query );
}
/* perform the query */
r = MSI_DatabaseOpenViewW(db, query, view);
......@@ -219,6 +220,7 @@ MSIRECORD *MSI_QueryGetRecord( MSIDATABASE *db, LPCWSTR fmt, ... )
if (res == -1) size *= 2;
else if (res >= size) size = res + 1;
else break;
HeapFree( GetProcessHeap(), 0, query );
}
/* perform the query */
r = MSI_DatabaseOpenViewW(db, query, &view);
......
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