Index: dll/win32/wbemprox/builtin.c =================================================================== --- dll/win32/wbemprox/builtin.c (revision 74931) +++ dll/win32/wbemprox/builtin.c (working copy) @@ -1704,7 +1704,7 @@ static const WCHAR dotW[] = {'.',0}, dotdotW[] = {'.','.',0}; struct record_datafile *rec; UINT i, len, row = 0, offset = 0, num_expected_rows; - WCHAR *glob = NULL, *path = NULL, *new_path, root[] = {'A',':','\\',0}; + WCHAR *glob = NULL, *path = NULL, *new_path = NULL, root[] = {'A',':','\\',0}; DWORD drives = GetLogicalDrives(); WIN32_FIND_DATAW data; HANDLE handle; @@ -1751,7 +1751,6 @@ if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { if (push_dir( dirstack, new_path, len )) continue; - heap_free( new_path ); FindClose( handle ); status = FILL_STATUS_FAILED; goto done; @@ -1785,6 +1784,10 @@ free_dirstack( dirstack ); heap_free( glob ); heap_free( path ); + + if (new_path){ + heap_free( new_path ); + } TRACE("created %u rows\n", row); table->num_rows = row;