Abhishekmishra2808 commented on code in PR #19900:
URL: https://github.com/apache/nuttx/pull/19900#discussion_r3968486636


##########
fs/event/event_open.c:
##########
@@ -102,7 +102,12 @@ int nxevent_open(FAR nxevent_t **event, FAR const char 
*name,
    * will have incremented the reference count on the inode.
    */
 
-  SETUP_SEARCH(&desc, fullpath, false);
+  ret = inode_search_setup(&desc, fullpath, false);
+  if (ret < 0)
+    {
+      inode_search_release(&desc);

Review Comment:
   Fixed in latest push.



##########
fs/fat/fs_fat32attrib.c:
##########
@@ -59,7 +59,12 @@ static int fat_attrib(const char *path, fat_attrib_t 
*retattrib,
 
   /* Find the inode for this file */
 
-  SETUP_SEARCH(&desc, path, false);
+  ret = inode_search_setup(&desc, path, false);
+  if (ret < 0)
+    {
+      inode_search_release(&desc);

Review Comment:
   Fixed in latest push.



##########
fs/inode/fs_inoderemove.c:
##########
@@ -71,7 +71,12 @@ static FAR struct inode *inode_unlink(FAR const char *path)
 
   /* Find the node to unlink */
 
-  SETUP_SEARCH(&desc, path, true);
+  ret = inode_search_setup(&desc, path, true);
+  if (ret < 0)
+    {
+      inode_search_release(&desc);

Review Comment:
   Fixed in latest push.



##########
fs/inode/fs_inodereserve.c:
##########
@@ -207,7 +208,12 @@ int inode_reserve(FAR const char *path,
 
   /* Find the location to insert the new subtree */
 
-  SETUP_SEARCH(&desc, path, false);
+  ret = inode_search_setup(&desc, path, false);
+  if (ret < 0)
+    {
+      inode_search_release(&desc);

Review Comment:
   Fixed in latest push.



##########
fs/vfs/fs_unlink.c:
##########
@@ -68,7 +68,11 @@ int nx_unlink(FAR const char *pathname)
    * which may be a symbolic link)
    */
 
-  SETUP_SEARCH(&desc, pathname, true);
+  ret = inode_search_setup(&desc, pathname, true);
+  if (ret < 0)
+    {
+      goto errout_with_search;

Review Comment:
   Fixed in latest push.



##########
fs/vfs/fs_statfs.c:
##########
@@ -93,7 +93,12 @@ int statfs(FAR const char *path, FAR struct statfs *buf)
 
   /* Get an inode for this file */
 
-  SETUP_SEARCH(&desc, path, false);
+  ret = inode_search_setup(&desc, path, false);
+  if (ret < 0)
+    {
+      inode_search_release(&desc);

Review Comment:
   Fixed in latest push.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to