nuttx/drivers/pipes
ligd 1a21445877 pipes: use priv refs instead of inode to resolve memleak
thread1                 thread2
open pipe               open pipe
close()
-> pipecommon_close()
  -> check inode refs
  -> do NOT free dev    close()
                        -> pipecommon_close()
                          -> check inode refs
                          -> do NOT free dev
-> inode_release
   inode refs--
                        -> inode_release
                           inode refs--

Then, you will see the pipe hasn't free its resource, memleak

Resolve:
replace the inode refs with priv refs

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-08-23 16:14:39 -03:00
..
CMakeLists.txt
fifo.c
Kconfig
Make.defs
pipe_common.c pipes: use priv refs instead of inode to resolve memleak 2024-08-23 16:14:39 -03:00
pipe_common.h pipes: use priv refs instead of inode to resolve memleak 2024-08-23 16:14:39 -03:00
pipe.c pipes: use priv refs instead of inode to resolve memleak 2024-08-23 16:14:39 -03:00