os/svcall: Fix TZ context handling issue
TZ context is freed but not updated in the task tcb. This will lead
to reuse of old freed context. So, we set the tz_context in tcb to
NULL.
@@ -568,6 +568,7 @@ int up_svcall(int irq, FAR void *context, FAR void *arg)
case SYS_free_securecontext: {
/* Free the secure context. */
TZ_FreeModuleContext_S(rtcb->tz_context);
+ rtcb->tz_context = NULL;
}
break;
#endif
