From f03fc4a179f7d16c3731fa9877ab50bbbd22deac Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 7 Feb 2022 00:36:23 +0800 Subject: [PATCH] serial/pty: Destroy pp_slavesem in pty_destroy to avoid the leak Signed-off-by: Xiang Xiao --- drivers/serial/pty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/serial/pty.c b/drivers/serial/pty.c index d6be3526eb..bcd43e1e59 100644 --- a/drivers/serial/pty.c +++ b/drivers/serial/pty.c @@ -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