1
0
mirror of https://github.com/switchbrew/libnx.git synced 2025-07-04 02:22:15 +02:00

Fix memory leak in tmemCreate

This commit is contained in:
plutooo 2018-08-11 15:00:52 +02:00
parent d3f388d2c8
commit fb42ebe53a

View File

@ -29,6 +29,11 @@ Result tmemCreate(TransferMemory* t, size_t size, Permission perm)
rc = svcCreateTransferMemory(&t->handle, t->src_addr, size, perm);
}
if (R_FAILED(rc)) {
free(t->src_addr);
t->src_addr = NULL;
}
return rc;
}