diff --git a/libs/libc/modlib/modlib_init.c b/libs/libc/modlib/modlib_init.c index 4b14196dc8..aa1b0f61ac 100644 --- a/libs/libc/modlib/modlib_init.c +++ b/libs/libc/modlib/modlib_init.c @@ -132,6 +132,7 @@ int modlib_initialize(FAR const char *filename, /* Clear the load info structure */ memset(loadinfo, 0, sizeof(struct mod_loadinfo_s)); + loadinfo->filfd = -1; /* Get the length of the file. */