Revert "frameworks: squash of leak & race fixes"

This reverts commit 5fa4b38aeee6e5d2e8aa7e859490d7997101b4da.

Signed-off-by: aways <aways@c-rom.biz>