commit | 23c21baf27b7dbc0d4ce0f8d0d7d00437b9979e8 | [log] [tgz] |
---|---|---|
author | Dave Sparks <davidsparks@android.com> | Fri Nov 06 11:47:13 2009 -0800 |
committer | Dave Sparks <davidsparks@android.com> | Fri Nov 06 11:47:13 2009 -0800 |
tree | 0e4dbfb10badadbb193645de84fd24d2e116d304 | |
parent | c47c0789be990e6660ac9d2c56b74631a144360f [diff] |
Hold a lock while we access the preview heap. copyFrameAndPostCopiedFrame was not holding a lock while it accessed the preview heap. If the client process is torn down while the heap is accessed, the memcpy could access memory that was deallocated. This patch creates a local sp reference to the preview heap while holding the lock, then releases the lock. This should prevent the heap from being pulled out from underneath us.