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:
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
|
||||
|
|
Loading…
Reference in New Issue