From a1abb818a934354289d2b9f6a11d5c0255436bdd Mon Sep 17 00:00:00 2001 From: chao an Date: Sun, 20 Nov 2022 21:46:53 +0800 Subject: [PATCH] drivers/misc/rpmsgdev: destroy nxmutex properly --- drivers/misc/rpmsgdev_server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/rpmsgdev_server.c b/drivers/misc/rpmsgdev_server.c index 0e5b214849..9df1066830 100644 --- a/drivers/misc/rpmsgdev_server.c +++ b/drivers/misc/rpmsgdev_server.c @@ -403,6 +403,7 @@ static void rpmsgdev_ns_bind(FAR struct rpmsg_device *rdev, rpmsgdev_ept_cb, rpmsgdev_ns_unbind); if (ret < 0) { + nxmutex_destroy(&server->lock); kmm_free(server); } }