mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-27 15:22:40 +02:00
Why is this not crashing
This commit is contained in:
parent
368fbbb570
commit
b877e1b1c1
@ -77,10 +77,6 @@ Result tmemClose(TransferMemory* t)
|
|||||||
{
|
{
|
||||||
Result rc = 0;
|
Result rc = 0;
|
||||||
|
|
||||||
if (t->src_addr != NULL) {
|
|
||||||
free(t->src_addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (t->map_addr != NULL) {
|
if (t->map_addr != NULL) {
|
||||||
rc = tmemUnmap(t);
|
rc = tmemUnmap(t);
|
||||||
}
|
}
|
||||||
@ -90,6 +86,10 @@ Result tmemClose(TransferMemory* t)
|
|||||||
rc = svcCloseHandle(t->handle);
|
rc = svcCloseHandle(t->handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (t->src_addr != NULL) {
|
||||||
|
free(t->src_addr);
|
||||||
|
}
|
||||||
|
|
||||||
t->src_addr = NULL;
|
t->src_addr = NULL;
|
||||||
t->handle = INVALID_HANDLE;
|
t->handle = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user