OSDN Git Service
(root)
/
android-x86
/
art.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f3f766
)
Fix DDM reply buffer deallocation
author
Sebastien Hertz
<shertz@google.com>
Thu, 6 Aug 2015 09:37:02 +0000
(11:37 +0200)
committer
Sebastien Hertz
<shertz@google.com>
Thu, 6 Aug 2015 09:38:32 +0000
(11:38 +0200)
Reply buffer is an uint8_t* allocated with new uint8_t[...] so it
must be deallocated with delete[], not free.
Change-Id: Ib5d6387aa63f1e0393113f82602f661bbada4aa2
runtime/jdwp/jdwp_handler.cc
patch
|
blob
|
history
diff --git
a/runtime/jdwp/jdwp_handler.cc
b/runtime/jdwp/jdwp_handler.cc
index
f449406
..
7776f8f
100644
(file)
--- a/
runtime/jdwp/jdwp_handler.cc
+++ b/
runtime/jdwp/jdwp_handler.cc
@@
-1391,7
+1391,7
@@
static JdwpError DDM_Chunk(JdwpState* state, Request* request, ExpandBuf* pReply
// 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;
}