You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/11/20 14:36:33 UTC

[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7628: fs/userfs: destroy nxmutex properly

anchao commented on code in PR #7628:
URL: https://github.com/apache/incubator-nuttx/pull/7628#discussion_r1027300737


##########
drivers/misc/rwbuffer.c:
##########
@@ -842,6 +843,19 @@ int rwb_initialize(FAR struct rwbuffer_s *rwb)
         {
           ferr("Read-ahead buffer kmm_malloc(%" PRIu32 ") failed\n",
           allocsize);
+          nxmutex_destroy(&rwb->rhlock);
+#ifdef CONFIG_DRVR_WRITEBUFFER
+          if (rwb->wrmaxblocks > 0)
+            {
+              nxmutex_destroy(&rwb->wrlock);
+            }
+
+          if (rwb->wrbuffer)

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org