libs/libc/modlib/modlib_init.c: initialize file descriptor with -1
Use -1 instead of 0 to represent an invalid descriptor so that modlib_uninitialize doesn't try to close the descriptor 0.
This commit is contained in:
parent
bac6b11065
commit
542574acd6
|
@ -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. */
|
||||
|
||||
|
|
Loading…
Reference in New Issue