mirror of
https://github.com/apache/nuttx.git
synced 2025-12-09 11:43:39 +08:00
various fixes (#49)
* libs: libc: math: Fix tanh() math functions * drivers: mtd: smart: Fix trivial debug message in smartfs * binfmt: libelf: Fix fd not closed on error * binfmt: Fix stack memory leak on error * fs: romfs: Fix private data not free on error * sched: group: Fix reference after free memory * sched: clock: Fix clock sync Fix clock sync when CONFIG_RTC_HIRES is enabled
This commit is contained in:
@@ -186,6 +186,7 @@ int exec_module(FAR const struct binary_s *binp)
|
||||
{
|
||||
ret = -get_errno();
|
||||
berr("task_init() failed: %d\n", ret);
|
||||
kumm_free(stack);
|
||||
goto errout_with_addrenv;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,6 +176,7 @@ int elf_init(FAR const char *filename, FAR struct elf_loadinfo_s *loadinfo)
|
||||
if (ret < 0)
|
||||
{
|
||||
berr("Failed to read ELF header: %d\n", ret);
|
||||
close(loadinfo->filfd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -194,6 +195,7 @@ int elf_init(FAR const char *filename, FAR struct elf_loadinfo_s *loadinfo)
|
||||
*/
|
||||
|
||||
berr("Bad ELF header: %d\n", ret);
|
||||
close(loadinfo->filfd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user