patacongo commented on a change in pull request #414:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/414#discussion_r497756163



##########
File path: fsutils/ipcfg/ipcfg.c
##########
@@ -220,11 +218,14 @@ static int ipcfg_open(FAR const char *netdev, int oflags, 
mode_t mode)
   if (ret < 0)
     {
       ret = -errno;
+      close(fd);
       fprintf(stderr, "ERROR: Failed to seek to $ld: %d\n",
               (long)CONFIG_IPCFG_OFFSET, ret);
-      close(fd);
+      goto errout_with_path;
     }
+
 #endif
+  ret = fd;
 

Review comment:
       Never mind.  It is clearer looking at the whole file.




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

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


Reply via email to