summaryrefslogtreecommitdiff
path: root/sys/boot/common/module.c
diff options
context:
space:
mode:
authorMike Smith <msmith@FreeBSD.org>2000-02-17 02:19:19 +0000
committerMike Smith <msmith@FreeBSD.org>2000-02-17 02:19:19 +0000
commit51b5739aaff32bc688174defb9521a8ba2c96db0 (patch)
tree402f0fd2b9889fe76193c53d7ab72a67670b7cd6 /sys/boot/common/module.c
parent0169694662f900c582e7dbce048fb9ffbf8967e6 (diff)
Notes
Diffstat (limited to 'sys/boot/common/module.c')
-rw-r--r--sys/boot/common/module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/boot/common/module.c b/sys/boot/common/module.c
index 63f1c9ff7391..fb402af345c0 100644
--- a/sys/boot/common/module.c
+++ b/sys/boot/common/module.c
@@ -262,6 +262,7 @@ mod_loadobj(char *type, char *name)
if (got < 0) { /* error */
sprintf(command_errbuf, "error reading '%s': %s", name, strerror(errno));
free(name);
+ close(fd);
return(CMD_ERROR);
}
laddr += got;
@@ -282,6 +283,7 @@ mod_loadobj(char *type, char *name)
/* Add to the list of loaded modules */
mod_append(mp);
+ close(fd);
return(CMD_OK);
}