This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit bac6b11065c90de881c1e9cc8ad341d64a1ba225
Author: YAMAMOTO Takashi <yamam...@midokura.com>
AuthorDate: Thu Feb 25 13:53:20 2021 +0900

    sched/module/mod_insmod.c: Fix a resource leak
    
    Note: partially initialized loadinfo should be uninitialized.
    It can contain an open file descriptor.
---
 sched/module/mod_insmod.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sched/module/mod_insmod.c b/sched/module/mod_insmod.c
index 6e062f3..b94d080 100644
--- a/sched/module/mod_insmod.c
+++ b/sched/module/mod_insmod.c
@@ -185,7 +185,7 @@ FAR void *insmod(FAR const char *filename, FAR const char 
*modname)
   if (ret != 0)
     {
       berr("ERROR: Failed to initialize to load module: %d\n", ret);
-      goto errout_with_lock;
+      goto errout_with_loadinfo;
     }
 
   /* Allocate a module registry entry to hold the module data */

Reply via email to