sched/module/mod_insmod.c: Fix a resource leak

Note: partially initialized loadinfo should be uninitialized.
It can contain an open file descriptor.
This commit is contained in:
YAMAMOTO Takashi 2021-02-25 13:53:20 +09:00 committed by Xiang Xiao
parent 8085010ae8
commit bac6b11065

View File

@ -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 */