Donny9 commented on code in PR #10676:
URL: https://github.com/apache/nuttx/pull/10676#discussion_r1331028629


##########
libs/libc/modlib/modlib_loadhdrs.c:
##########
@@ -116,7 +116,6 @@ int modlib_loadhdrs(FAR struct mod_loadinfo_s *loadinfo)
       loadinfo->phdr = (FAR Elf_Phdr *)lib_malloc(phdrsize);
       if (!loadinfo->phdr)
         {
-          lib_free(loadinfo->shdr);

Review Comment:
   Yes, resources should be released internally, but I look at the usage of 
libc/dlfcn and sched/module. All resource releases are placed in 
modlib_uninitialize and modlib_unload. It seems that we can make less changes 
and reuse some code.



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