xiaoxiang781216 commented on code in PR #21902:
URL: https://github.com/apache/nuttx/pull/21902#discussion_r4643661983


##########
libs/libc/elf/elf_load.c:
##########
@@ -825,13 +824,7 @@ static int libelf_pinhold(FAR struct mod_loadinfo_s 
*loadinfo)
       return -ENOMEM;
     }
 
-  ret = file_get(loadinfo->filfd, &filep);
-  if (ret >= 0)
-    {
-      ret = file_dup2(filep, loadinfo->pinfile);
-      file_put(filep);
-    }
-
+  ret = file_dup2(&loadinfo->file, loadinfo->pinfile);

Review Comment:
   should we add _NX_FILE_DUP?



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