Use delete[] on array (CID #701816)
This commit is contained in:
@@ -250,7 +250,7 @@ BUSBInterface::_UpdateDescriptorAndEndpoints()
|
|||||||
// Delete old endpoints
|
// Delete old endpoints
|
||||||
for (int32 i = 0; i < fDescriptor.num_endpoints; i++)
|
for (int32 i = 0; i < fDescriptor.num_endpoints; i++)
|
||||||
delete fEndpoints[i];
|
delete fEndpoints[i];
|
||||||
delete fEndpoints;
|
delete[] fEndpoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
fEndpoints = new(std::nothrow) BUSBEndpoint *[fDescriptor.num_endpoints];
|
fEndpoints = new(std::nothrow) BUSBEndpoint *[fDescriptor.num_endpoints];
|
||||||
|
|||||||
Reference in New Issue
Block a user