mm: fix memory management & CM Camera Fix #1