Use the right form of delete. Fixes CID 11037.

This commit is contained in:
Michael Lotz
2011-12-05 02:29:26 +01:00
parent ef2eaedc2e
commit 04c140226c
+2 -2
View File
@@ -770,7 +770,7 @@ EHCI::SubmitIsochronous(Transfer *transfer)
addr_t bufferPhy; addr_t bufferPhy;
if (fStack->AllocateChunk(&bufferLog, (void**)&bufferPhy, dataLength) < B_OK) { if (fStack->AllocateChunk(&bufferLog, (void**)&bufferPhy, dataLength) < B_OK) {
TRACE_ERROR("unable to allocate itd buffer\n"); TRACE_ERROR("unable to allocate itd buffer\n");
delete isoRequest; delete[] isoRequest;
return B_NO_MEMORY; return B_NO_MEMORY;
} }
@@ -836,7 +836,7 @@ EHCI::SubmitIsochronous(Transfer *transfer)
TRACE_ERROR("failed to add pending isochronous transfer\n"); TRACE_ERROR("failed to add pending isochronous transfer\n");
for (uint32 i = 0; i < itdIndex; i++) for (uint32 i = 0; i < itdIndex; i++)
FreeDescriptor(isoRequest[i]); FreeDescriptor(isoRequest[i]);
delete isoRequest; delete[] isoRequest;
return result; return result;
} }