mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 21:02:39 +02:00
Fix memory leak in tmemCreate
This commit is contained in:
parent
d3f388d2c8
commit
fb42ebe53a
@ -29,6 +29,11 @@ Result tmemCreate(TransferMemory* t, size_t size, Permission perm)
|
|||||||
rc = svcCreateTransferMemory(&t->handle, t->src_addr, size, perm);
|
rc = svcCreateTransferMemory(&t->handle, t->src_addr, size, perm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (R_FAILED(rc)) {
|
||||||
|
free(t->src_addr);
|
||||||
|
t->src_addr = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user