xiaoxiang781216 commented on code in PR #8965:
URL: https://github.com/apache/nuttx/pull/8965#discussion_r1158566146


##########
sched/task/task_setup.c:
##########
@@ -160,8 +161,9 @@ static int nxtask_assign_pid(FAR struct tcb_s *tcb)
 
   /* Release resource for original g_pidhash, using new g_pidhash */
 
-  kmm_free(g_pidhash);
+  temp = g_pidhash;

Review Comment:
   The whole code is protected by critical section, it doesn't make sense to 
add a local variable here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to