diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2014-04-28 21:04:48 -0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2014-05-14 20:24:19 -0300 |
commit | 30bfd48aeffa6465d2de0e927cdfc6205c1f1fd2 (patch) | |
tree | 652f298be822cd158693e1e0e7b03b18cf2dec37 | |
parent | c1bc88c98ed2c1dce4de8a6ed45db212a19f79f4 (diff) | |
download | kmod-30bfd48aeffa6465d2de0e927cdfc6205c1f1fd2.tar.gz kmod-30bfd48aeffa6465d2de0e927cdfc6205c1f1fd2.tar.bz2 kmod-30bfd48aeffa6465d2de0e927cdfc6205c1f1fd2.zip |
Close /sys/module/$NAME directory if opening /proc/module fails.
-rw-r--r-- | libkmod/libkmod-module.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c index a160d5b..e3cc5a7 100644 --- a/libkmod/libkmod-module.c +++ b/libkmod/libkmod-module.c @@ -1802,6 +1802,7 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod) int err = -errno; ERR(mod->ctx, "could not open /proc/modules: %s\n", strerror(errno)); + close(dfd); return err; } |