Merge "Remove possible leak when exception occurred." into kitkat