Donny9 opened a new pull request, #17776:
URL: https://github.com/apache/nuttx/pull/17776

   
   ## Summary
   
       drivers/serial/pty: fix memory leak when pty_destroy
   
       1. ptmx_open -> pty_register2 -> master register i_crefs 1
                                     -> salve  register i_crefs 1
       2. ptmx_open -> master unregister i_crefs 0
       3. master open i_crefs 1
          salve  open i_crefs 2
       
       4. in pty_close() master close with i_crefs 1
                         salve  close with i_crefs 2
       
       So, if correct the i_crefs judgement in pty_close()
   
   ## Impact
   
   bug fix: https://github.com/apache/nuttx/issues/17759
   
   ## Testing
   
   sim:nsh , enable SIM_ASAN
   
   ```c
   djz:nuttx$ ./nuttx                                                           
                                  
   ==1861366==WARNING: ASan is ignoring requested __asan_handle_no_return: 
stack type: default top: 0x7fff5543c000; bottom 0x63100000f000; size: 
0x1cef5542d000 (31814253203456)                                                 
   False positive error reports may follow                                      
                                  
   For details see https://github.com/google/sanitizers/issues/189              
                                                                                
                                                                 
                                                                                
                                  
   NuttShell (NSH) NuttX-10.4.0                                                 
                                  
   nsh> hello                                             
   nsh> lsan                                              
   nsh> poweroff  
   ```
   


-- 
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