Fix DDM reply buffer deallocation
Reply buffer is an uint8_t* allocated with new uint8_t[...] so it
must be deallocated with delete[], not free.
Change-Id: Ib5d6387aa63f1e0393113f82602f661bbada4aa2
diff --git a/runtime/jdwp/jdwp_handler.cc b/runtime/jdwp/jdwp_handler.cc
index f449406..7776f8f 100644
--- a/runtime/jdwp/jdwp_handler.cc
+++ b/runtime/jdwp/jdwp_handler.cc
@@ -1391,7 +1391,7 @@
// heap requirements is probably more valuable than the efficiency.
CHECK_GT(replyLen, 0);
memcpy(expandBufAddSpace(pReply, replyLen), replyBuf, replyLen);
- free(replyBuf);
+ delete[] replyBuf;
}
return ERR_NONE;
}