OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bebb84
)
Fix memory leak in RenderThread::dumpGraphicsMemory.
author
Josh Gao
<jmgao@google.com>
Tue, 26 Jun 2018 18:41:34 +0000
(11:41 -0700)
committer
Josh Gao
<jmgao@google.com>
Tue, 26 Jun 2018 19:37:42 +0000
(12:37 -0700)
This would have been a double-close of fd, except we just leak the
FILE* instead.
Test: treehugger
Change-Id: I519366fbcf0eb6f03f79c22abfa2b1b1b493a70a
libs/hwui/renderthread/RenderThread.cpp
patch
|
blob
|
history
diff --git
a/libs/hwui/renderthread/RenderThread.cpp
b/libs/hwui/renderthread/RenderThread.cpp
index
72a428f
..
bd34eb8
100644
(file)
--- a/
libs/hwui/renderthread/RenderThread.cpp
+++ b/
libs/hwui/renderthread/RenderThread.cpp
@@
-236,10
+236,8
@@
void RenderThread::dumpGraphicsMemory(int fd) {
break;
}
- FILE *file = fdopen(fd, "a");
- fprintf(file, "\n%s\n", cachesOutput.string());
- fprintf(file, "\nPipeline=%s\n", pipeline.string());
- fflush(file);
+ dprintf(fd, "\n%s\n", cachesOutput.string());
+ dprintf(fd, "\nPipeline=%s\n", pipeline.string());
}
Readback& RenderThread::readback() {