void tee_memm_destroy_ss(tee_memm_ss_t tee_memm_ss) { tee_memm_handle_t *tee_memm_handle; if (!tee_memm_ss) return; tee_memm_handle = (tee_memm_handle_t *) tee_memm_ss; if (!(IS_MEMM_MAGIC_VALID(tee_memm_handle->magic))) return; CLEANUP_MEMM_MAGIC(tee_memm_handle->magic); if (tee_memm_handle->page_list_buf) osa_kmem_free(tee_memm_handle->page_list_buf); osa_kmem_free(tee_memm_handle); return; }
/* ****************************** * will not destroy the msg buf * *******************************/ void tee_msgm_destroy_inst(tee_msgm_t msgm) { tee_msgm_ntw_struct *ntw_handle = NULL; OSA_ASSERT(msgm); ntw_handle = (tee_msgm_ntw_struct *) msgm; OSA_ASSERT(IS_MAGIC_VALID(ntw_handle->magic)); CLEANUP_MAGIC(ntw_handle->magic); osa_kmem_free(ntw_handle); ntw_handle = NULL; return; }