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:
Xiang Xiao 2022-02-07 00:36:23 +08:00 committed by Alan Carvalho de Assis
parent cc8ab23550
commit f03fc4a179
1 changed files with 1 additions and 0 deletions

View File

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