From 04c140226cc085987a99ec2d430c5dd498fc0311 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Mon, 5 Dec 2011 02:29:26 +0100 Subject: [PATCH] Use the right form of delete. Fixes CID 11037. --- src/add-ons/kernel/busses/usb/ehci.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/ehci.cpp b/src/add-ons/kernel/busses/usb/ehci.cpp index 70ea5b15d1..3ce830f32e 100644 --- a/src/add-ons/kernel/busses/usb/ehci.cpp +++ b/src/add-ons/kernel/busses/usb/ehci.cpp @@ -770,7 +770,7 @@ EHCI::SubmitIsochronous(Transfer *transfer) addr_t bufferPhy; if (fStack->AllocateChunk(&bufferLog, (void**)&bufferPhy, dataLength) < B_OK) { TRACE_ERROR("unable to allocate itd buffer\n"); - delete isoRequest; + delete[] isoRequest; return B_NO_MEMORY; } @@ -836,7 +836,7 @@ EHCI::SubmitIsochronous(Transfer *transfer) TRACE_ERROR("failed to add pending isochronous transfer\n"); for (uint32 i = 0; i < itdIndex; i++) FreeDescriptor(isoRequest[i]); - delete isoRequest; + delete[] isoRequest; return result; }