From: Hans Leidekker hans@codeweavers.com
--- dlls/wbemprox/builtin.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 8a7a092cee1..9ed783327ce 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -1191,7 +1191,7 @@ static BOOL resize_table( struct table *table, UINT row_count, UINT row_size ) { if (!table->num_rows_allocated) { - if (!(table->data = malloc( row_count * row_size ))) return FALSE; + if (!(table->data = calloc( row_count, row_size ))) return FALSE; table->num_rows_allocated = row_count; return TRUE; } @@ -1200,6 +1200,7 @@ static BOOL resize_table( struct table *table, UINT row_count, UINT row_size ) BYTE *data; UINT count = max( row_count, table->num_rows_allocated * 2 ); if (!(data = realloc( table->data, count * row_size ))) return FALSE; + memset( data + table->num_rows_allocated * row_size, 0, (count - table->num_rows_allocated) * row_size ); table->data = data; table->num_rows_allocated = count; } @@ -1535,11 +1536,9 @@ static enum fill_status fill_bios( struct table *table, const struct expr *cond GetSystemFirmwareTable( RSMB, 0, buf, len );
rec = (struct record_bios *)table->data; - rec->currentlanguage = NULL; rec->description = L"Default System BIOS"; rec->ecmajorversion = get_bios_ec_firmware_major_release( buf, len ); rec->ecminorversion = get_bios_ec_firmware_minor_release( buf, len ); - rec->identificationcode = NULL; rec->manufacturer = get_bios_manufacturer( buf, len ); rec->name = L"Default System BIOS"; rec->releasedate = get_bios_releasedate( buf, len ); @@ -1754,8 +1753,6 @@ static enum fill_status fill_compsys( struct table *table, const struct expr *co rec = (struct record_computersystem *)table->data; rec->description = L"AT/AT COMPATIBLE"; rec->domain = L"WORKGROUP"; - rec->domainrole = 0; /* standalone workstation */ - rec->hypervisorpresent = 0; rec->manufacturer = get_compsysproduct_vendor( buf, len ); rec->model = get_compsysproduct_name( buf, len ); rec->name = get_computername(); @@ -1824,7 +1821,6 @@ static enum fill_status fill_compsysproduct( struct table *table, const struct e rec = (struct record_computersystemproduct *)table->data; rec->identifyingnumber = get_compsysproduct_identifyingnumber( buf, len ); rec->name = get_compsysproduct_name( buf, len ); - rec->skunumber = NULL; rec->uuid = get_compsysproduct_uuid( buf, len ); rec->vendor = get_compsysproduct_vendor( buf, len ); rec->version = get_compsysproduct_version( buf, len ); @@ -2577,11 +2573,9 @@ static enum fill_status fill_diskpartition( struct table *table, const struct ex swprintf( device_id, ARRAY_SIZE( device_id ), L"Disk #%u, Partition #0", index ); rec->device_id = wcsdup( device_id ); rec->diskindex = index++; - rec->index = 0; rec->pnpdevice_id = wcsdup( device_id ); get_freespace( root, &size ); rec->size = size; - rec->startingoffset = 0; rec->type = get_filesystem( root ); if (!match_row( table, row, cond, &status )) { @@ -2957,7 +2951,6 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e rec->interface_index = aa->IfIndex; rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength ); rec->manufacturer = L"The Wine Project"; - rec->netconnection_id = NULL; /* FIXME Windows seems to fill this when it's connected and in use */ rec->name = wcsdup( aa->FriendlyName ); rec->netenabled = connection_status ? -1 : 0; rec->netconnection_status = connection_status; @@ -3313,7 +3306,6 @@ static enum fill_status fill_printer( struct table *table, const struct expr *co rec->local = -1; rec->location = wcsdup( info[i].pLocation ); rec->name = wcsdup( info[i].pPrinterName ); - rec->network = 0; rec->portname = wcsdup( info[i].pPortName ); if (!match_row( table, i, cond, &status )) { @@ -3370,7 +3362,6 @@ static enum fill_status fill_process( struct table *table, const struct expr *co rec->process_id = entry.th32ProcessID; rec->pprocess_id = entry.th32ParentProcessID; rec->thread_count = entry.cntThreads; - rec->workingsetsize = 0; /* methods */ rec->create = process_create; rec->get_owner = process_get_owner; @@ -3565,7 +3556,6 @@ static enum fill_status fill_processor( struct table *table, const struct expr * rec->processor_id = wcsdup( processor_id ); rec->processortype = 3; /* central processor */ rec->revision = get_processor_revision(); - rec->unique_id = NULL; rec->version = wcsdup( version ); if (!match_row( table, i, cond, &status )) { @@ -4262,16 +4252,13 @@ static enum fill_status fill_videocontroller( struct table *table, const struct }
rec = (struct record_videocontroller *)table->data; - memset( rec, 0, sizeof(*rec) ); rec->adapter_compatibility = L"(Standard display types)"; rec->adapter_dactype = L"Integrated RAMDAC"; rec->adapter_ram = vidmem; rec->availability = 3; /* Running or Full Power */ rec->caption = wcsdup( name ); - rec->config_errorcode = 0; /* no error */ rec->current_bitsperpixel = get_bitsperpixel( &hres, &vres ); rec->current_horizontalres = hres; - rec->current_refreshrate = 0; /* default refresh rate */ rec->current_scanmode = 2; /* Unknown */ rec->current_verticalres = vres; rec->description = wcsdup( name );