loader: Ensure code:/ unmounts if mounted.

This commit is contained in:
Michael Scire 2019-03-23 18:27:53 -07:00
parent 047f3b653e
commit dc1db0dc72

View file

@ -231,6 +231,8 @@ Result ProcessCreation::CreateProcess(Handle *out_process_h, u64 index, char *nc
/* ECS is a one-shot operation, but we don't clear on failure. */
ContentManagement::ClearExternalContentSource(target_process->tid_sid.title_id);
CREATE_PROCESS_END:
if (mounted_code) {
if (R_SUCCEEDED(rc) && target_process->tid_sid.storage_id != FsStorageId_None) {
rc = ContentManagement::UnmountCode();
@ -239,7 +241,6 @@ Result ProcessCreation::CreateProcess(Handle *out_process_h, u64 index, char *nc
}
}
CREATE_PROCESS_END:
if (R_SUCCEEDED(rc)) {
*out_process_h = process_h;
} else {