jasonbu commented on PR #2522:
URL: https://github.com/apache/nuttx-apps/pull/2522#issuecomment-2309419719

   there is a memleak case can reproduce in current code.
   
   ```C
   int main(int argc, FAR char *argv[])
   {
     printf("Hello, World!!\n");
     system("111 &");
     // system("sleep 5 &");
     return 0;
   }
   ```
   put these code in hello_main.c
   
   and check free before & after call hello,
   can see obviously memleak.
   
   direct cause is nsh_parse.c when do bg thread np, the foreground task quit 
quickly, cause memleak, 
   
   if disable 
https://github.com/apache/nuttx-apps/blob/89dd0c29e2e3c5dba42240b08ff4ca407b5848c6/nshlib/nsh_parse.c#L752-L853
 can see no memleak any more.
   
   already fixed in private fork. but look like not fixed by this commit, still 
doing root cause find.


-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to