Skip to content

Commit d3fd8b4

Browse files
volcano0drlzha101
authored andcommitted
Fix wrong parameter when calling mm_dealloc
Signed-off-by: volcano0dr <volcano_dr@163.com>
1 parent 1bf092a commit d3fd8b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/trts/trts_ecall.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@ sgx_status_t do_uninit_enclave(void *tcs)
556556
}
557557

558558
size_t start = (size_t)DEC_TCS_POINTER(tcs_node->tcs);
559-
size_t end = start + (1 << SE_PAGE_SHIFT);
560-
int rc = mm_dealloc((void*)start, end);
559+
size_t size = 1 << SE_PAGE_SHIFT;
560+
int rc = mm_dealloc((void*)start, size);
561561
if(rc != 0)
562562
{
563563
set_enclave_state(ENCLAVE_CRASHED);

0 commit comments

Comments
 (0)