Merge "Keymaster memory management is inconsistent"