Why is this not crashing

This commit is contained in:
plutoo 2018-01-20 12:25:51 +01:00
parent 368fbbb570
commit b877e1b1c1

View File

@ -77,10 +77,6 @@ Result tmemClose(TransferMemory* t)
{
Result rc = 0;
if (t->src_addr != NULL) {
free(t->src_addr);
}
if (t->map_addr != NULL) {
rc = tmemUnmap(t);
}
@ -90,6 +86,10 @@ Result tmemClose(TransferMemory* t)
rc = svcCloseHandle(t->handle);
}
if (t->src_addr != NULL) {
free(t->src_addr);
}
t->src_addr = NULL;
t->handle = INVALID_HANDLE;
}