OSDN Git Service
(root)
/
android-x86
/
dalvik.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eeae8a8
)
Possible leak in dvmAllocRegion
author
You Kim
<you.kim72@gmail.com>
Mon, 17 Dec 2012 15:14:07 +0000
(
00:14
+0900)
committer
You Kim
<you.kim72@gmail.com>
Mon, 17 Dec 2012 15:14:07 +0000
(
00:14
+0900)
In error case mmapped ptr 'base' is not munmapped.
Change-Id: I9e43841371fee6b7c092fe9a8922ae82e78805ed
vm/Misc.cpp
patch
|
blob
|
history
diff --git
a/vm/Misc.cpp
b/vm/Misc.cpp
index
1f01c2f
..
057b90d
100644
(file)
--- a/
vm/Misc.cpp
+++ b/
vm/Misc.cpp
@@
-624,6
+624,7
@@
void *dvmAllocRegion(size_t byteCount, int prot, const char *name) {
return NULL;
}
if (ret == -1) {
+ munmap(base, byteCount);
return NULL;
}
return base;