mm: fix memory management & CM Camera Fix #2