mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
serial/pty: Destroy pp_slavesem in pty_destroy to avoid the leak
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
cc8ab23550
commit
f03fc4a179
@@ -255,6 +255,7 @@ static void pty_destroy(FAR struct pty_devpair_s *devpair)
|
||||
/* And free the device structure */
|
||||
|
||||
nxsem_destroy(&devpair->pp_exclsem);
|
||||
nxsem_destroy(&devpair->pp_slavesem);
|
||||
kmm_free(devpair);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user