summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-03-26 15:23:02 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-03-26 15:23:02 -0700
commit29ca626639a507646242b35c9d7f2a8ccd0e3339 (patch)
tree902f3f3490904de1b8bf21399b329111947dcd90
parentbf099c10aa876bb8bac4ffa8884b06e4d8e5e72d (diff)
parentc4a7d89cde4516ce35cf92eb6467003b97331f8f (diff)
downloadomap3-29ca626639a507646242b35c9d7f2a8ccd0e3339.tar.gz
am c4a7d89c: Fix potential memory leak from video mio WM is still using the old video MIO to do rendering Over the test, I did not see it leaks, but it does not hurt to add a check.
Merge commit 'c4a7d89cde4516ce35cf92eb6467003b97331f8f' into froyo-plus-aosp * commit 'c4a7d89cde4516ce35cf92eb6467003b97331f8f': Fix potential memory leak from video mio
-rw-r--r--libopencorehw/android_surface_output_omap34xx.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libopencorehw/android_surface_output_omap34xx.cpp b/libopencorehw/android_surface_output_omap34xx.cpp
index 8708411..6c84751 100644
--- a/libopencorehw/android_surface_output_omap34xx.cpp
+++ b/libopencorehw/android_surface_output_omap34xx.cpp
@@ -127,6 +127,9 @@ OSCL_EXPORT_REF bool AndroidSurfaceOutputOmap34xx::initCheck()
mbufferAlloc.maxBuffers = 6; // Hardcoded to work with OMX decoder component
mbufferAlloc.bufferSize = iBufferSize;
+ if (mbufferAlloc.buffer_address) {
+ delete [] mbufferAlloc.buffer_address;
+ }
mbufferAlloc.buffer_address = new uint8*[mbufferAlloc.maxBuffers];
if (mbufferAlloc.buffer_address == NULL) {
LOGE("unable to allocate mem for overlay addresses");